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

Dump Request/Response On HTTP Response Code >= 300 #324

Open
wonderstim opened this issue May 1, 2024 · 1 comment · May be fixed by #397
Open

Dump Request/Response On HTTP Response Code >= 300 #324

wonderstim opened this issue May 1, 2024 · 1 comment · May be fixed by #397
Labels
enhancement New feature or request needs response

Comments

@wonderstim
Copy link

Is your feature request related to a problem? Please describe.
In dev I just always have debug on. I can't do that in production obviously, but because the API is generated it is actually pretty annoying to dump requests bodies from failed requests. This is particularly annoying when I am seeing 422 errors where the invalid parameters array is also empty.

Describe the solution you'd like
Similar to the debug configuration, just an option for dumping reqeusts and responses is the HTTP status code is not 2XX

Describe alternatives you've considered
Manually json marshaling each and every input on a returned error. This is a LOT of copy/pasted code.

Additional context
Add any other context or screenshots about the feature request here.

@wonderstim wonderstim added the enhancement New feature or request label May 1, 2024
@gcatanese gcatanese linked a pull request Dec 9, 2024 that will close this issue
@gcatanese
Copy link
Contributor

@wonderstim Hey Tim, I have created a PR to address the shortcoming, please let me know what you think.

Our long-term solution is to unify the error handling of all APIs so that we will be able to expose consistently any error using the same object (model) with all the necessary info (i.e. InvalidFields)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs response
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants