-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Improve error message (rfc7807) #13680
Improve error message (rfc7807) #13680
Conversation
|
||
// status title (detail) | ||
return fmt.Sprintf("%s %s", status, str) | ||
} |
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.
looks like this code block uses 4-space instead of tabs for indention, can you update it to use tabs instead?
@@ -360,7 +360,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class | |||
error: localVarHTTPResponse.Status, | |||
} | |||
{{#responses}} | |||
{{#dataType}} | |||
{{#dataType}} |
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.
please use tabs instead of 4-space
@wing328 It should be ok now, I had to remove the Mustache plugin for IntelliJ that was altering my indentation (sorry to waste your time) |
@gcatanese This PR introduced a panic into our code because it was trying to parse our custom error response according to RFC7807. Our custom error response doesn't have a Specifically, can the code check to ensure that the given error response conforms to RFC7807 before it tries to extract out its fields? |
Hey @jmontroy90 I had a look and I cannot reproduce the problem. The
Am I missing something? |
@gcatanese fair enough - I'll do some homework to reproduce and get back to you. |
@jmontroy90: is your problem maybe related to #15147? |
@antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @jirikuncar (2021/01) @ph4r5h4d (2021/04)
Improve error message when error returns RFC7807 model
Fix #13679
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.1.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)