-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update faraday_middleware #86
Conversation
* set `faraday_middleware` version to be `>= 1.0.0` * amend `PactasItero::Response::RaiseError` to conform with the [guides for custom faraday middlewares](https://lostisland.github.io/faraday/middleware/custom) [ch6713](https://app.clubhouse.io/shipcloud/story/6713)
This pull request has been linked to Clubhouse Story #6713: Update faraday und faraday_middleware. |
|
||
private | ||
|
||
def on_complete(response) | ||
if error = PactasItero::Error.from_response(response) | ||
raise error | ||
def call(request_env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Leerzeile kann noch weg.
In dem verlinkten Guide steht unten:
Do I need to override #call?
For the majority of middleware, it’s not necessary to override the #call method. You can instead use #on_request and #on_complete.
weswegen auch #on_complete
nach wie vor praktikabel wäre. Bei der Variante mit #call
steht noch:
When you do so, remember to call either app.call(env) or super to avoid breaking the middleware stack call!
Da du das tust, ist diese Variante aber so auch ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTM
faraday_middleware
version to be>= 1.0.0
PactasItero::Response::RaiseError
to conform with theguides for custom faraday middlewares
ch6713