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

chore: allow output from bad requests #184

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

sighphyre
Copy link
Member

Why

Currently, we have no way of knowing why an API request has failed outside of logging. This means that if we miss a log somewhere we have to patch the code in order to understand why it does what it does. This is worse for users because they can't do that and at very best it means fiddling with logging levels to try to figure out what's going on.

What

This patches the response to include the scrubbed error message as yielded by the impl Display for EdgeError implementation. Incoming SDKs will not understand the response here but they will discard the output anyway. Humans, on the other hand, can now understand why a request failed and hopefully how to address it

Copy link
Member

@chriswk chriswk left a comment

Choose a reason for hiding this comment

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

LGTM

@sighphyre sighphyre merged commit 4984c3e into main May 12, 2023
@sighphyre sighphyre deleted the chore/bad-request-info branch May 12, 2023 13:44
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