Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Faraday 1.0+, fix issue with non-raised server errors (50X) #316

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

smudge
Copy link

@smudge smudge commented Feb 9, 2021

In its 1.0 release, Faraday split Response::RaiseError::ClientErrorStatuses apart into a second ServerErrorStatuses constant.

This gem relied on ClientErrorStatuses returning 400...600, but now it returns 400...500 instead. This means that if Plaid's API returns a 50X code, and the consuming application is running Faraday 1.0+, no Ruby error will raise and code execution will continue as if a successful response had been returned.

This change decouples Plaid's middleware from Faraday's internal constants, such that both pre-1.0 and post-1.0 versions of Faraday should be supported.

In its 1.0 release, Faraday split `Response::RaiseError::ClientErrorStatuses` apart into a second `ServerErrorStatuses` constant.

This gem relied on `ClientErrorStatuses` to return `400...600`, but it returns `400...500` instead.

This change decouples Plaid's middleware from Faraday's internal constants, such that both pre-1.0 and post-1.0 versions of Faraday should be supported.
@smudge smudge changed the title Fix issue with non-raised server errors (50X) Support Faraday 1.0+, fix issue with non-raised server errors (50X) Mar 2, 2021
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.

1 participant