-
Notifications
You must be signed in to change notification settings - Fork 82
add response body logging to non 2xx responses #142
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
Conversation
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.
I would also add a section in the doc describing this behavior
@andsel I just simplified the PR for now to add the logging of the body. I also removed the event logging since it was broken already. it can be added in a separate PR. |
Tested with simple failing pipeline:
Log before
Log after
|
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.
LGTM after:
- CI is green
- update version also in
gemspec
Log the response body
and the event (in JSON format)when the endpoint returns a non 2xx response.Before, the logging entry included
:event => event
, but the event wasn't being displayed at all, it was just an stringified object reference.Given the potential size of the event or response size, both of these are only logged in debug mode.This PR makes logging more consistent with the retryable error logging.