-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Golang][client] fix response decode error handling #1291
[Golang][client] fix response decode error handling #1291
Conversation
Core fix: 649e617 The readability fix moves Benefits:
|
Circle CI failure looks possibly due to a bug in the test server. This was being skipped before because the decode error was being dropped, which this PR fixes. https://circleci.com/gh/grokify/openapi-generator/91#tests/containers/1
See the following issue for more info: |
I've done some thinking about this some more. It seems that now that the decode error is being handled, the 3 options:
|
…00` UTC offset present in Petstore test server
In discussion with @wing328, it was confirmed that the Petstore test server datetime issue (#1292) this known and was previously reported in the former issue tracker. We agreed to disable In d2c3006, the |
@grokify thanks for the PR, which is included in the v3.3.2 release: https://twitter.com/oas_generator/status/1057649626101112832 |
* handle and return API response decode error * ensure-up-to-date * refactor go/api.mustache for easier readability * disable error reporting for TestPlaceOrder with invalid RFC 3339 `+0000` UTC offset present in Petstore test server
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.4.x
,4.0.x
. Default:master
.@antihax @bvwells @kemokemo
Description of the PR
Fix #1287
When encountering a
client.decode
error, this will return the error message in aGenericOpenAPIError
with the response body included. Previously, the error would be dropped silently.