Skip to content

Clarify HTTP 4xx/5xx failures from feed reads - #146

Merged
Grotax merged 1 commit into
mainfrom
copilot/fix-feedio-reader-readerror
Oct 17, 2026
Merged

Grotax merged 1 commit into
mainfrom
copilot/fix-feedio-reader-readerror

Conversation

Copilot AI commented Oct 4, 2026 •

Copy link
Copy Markdown

Feed reads could fail with a generic internal server error even when the remote endpoint was actively rejecting the request, which made debugging 403/500 responses difficult and forced callers to do pre-flight checks.

  • Summary

    • HTTP errors returned by remote feeds were being collapsed into a single generic message.
    • This obscured the real server status and made valid-feed failures look like internal library faults.
  • What changed

    • The HTTP adapter now builds the exception message from the actual PSR-7 response status code and reason phrase.
    • ServerErrorException now reports values like Server responded with: 403 Forbidden instead of the hard-coded internal server error.
    • The regression is covered with explicit 403 and generic server-error assertions to keep the contract stable.
  • Example

try {
    $feedIo->read('https://www.jeuxvideo-live.com/feed');
} catch (\Throwable $e) {
    echo $e->getMessage();
    // Server responded with: 403 Forbidden
}

Copilot AI changed the title [WIP] Fix FeedIo eader eaderrorexception on HTTP 403 response Clarify HTTP 4xx/5xx failures from feed reads Oct 4, 2026
Copilot AI requested a review from Grotax October 4, 2026 09:15
@Grotax
Grotax marked this pull request as ready for review October 17, 2026 05:19
Co-authored-by: Grotax <5429298+Grotax@users.noreply.github.com>
@Grotax
Grotax force-pushed the copilot/fix-feedio-reader-readerror branch from 7e0c8f2 to 67d1d60 Compare October 17, 2026 05:27
@Grotax
Grotax merged commit 2a20ddf into main Oct 17, 2026
8 checks passed
@Grotax
Grotax deleted the copilot/fix-feedio-reader-readerror branch October 17, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FeedIo\Reader\ReadErrorException when reading a feed that return a HTTP 403 response

2 participants