Skip to content

Raise FaradayServerError on 5xx in multipart adapter - #58

Open
povilasjurcys wants to merge 1 commit into
masterfrom
fix/raise-on-server-errors
Open

povilasjurcys wants to merge 1 commit into
masterfrom
fix/raise-on-server-errors

Conversation

@povilasjurcys

@povilasjurcys povilasjurcys commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Currently, GraphlientMultipartAdapter registers Faraday::Response::RaiseError via c.adapter (not c.use), so it never runs. A 5xx from a proxy (e.g. an HTML 503 page) is returned as the body and blows up later as a bare JSON::ParserError in GraphQL::Client#query.

This PR drops the no-op line and raises Graphlient::Errors::FaradayServerError (with status_code) for 5xx responses. 4xx responses are deliberately still returned as the body, since they may carry GraphQL errors the model layer handles today — switching to RaiseError would change that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@hound hound Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files could not be reviewed due to errors:

Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop Naming/MethodParameterName found in .rubocop.yml
Warning: unrecognized cop RSpec/MultipleMemoizedHelpers found in .rubocop.yml
Error: RuboCop found unknown Ruby version 3.1 in `TargetRubyVersion` parameter (in .rubocop.yml).
Supported versions: 2.3, 2.4, 2.5, 2.6, 2.7

@povilasjurcys
povilasjurcys marked this pull request as ready for review September 28, 2026 15:52
@povilasjurcys
povilasjurcys requested a review from a team September 28, 2026 15:53

This branch has not been deployed

No deployments
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.

2 participants