[GO][Client] return GenericOpenAPIError instead of error in Execute()#8137
[GO][Client] return GenericOpenAPIError instead of error in Execute()#8137wing328 merged 14 commits intoOpenAPITools:masterfrom code-lucidal58:go-api-return-response
Conversation
|
Code snippet used to test the generated client code result, _, err := r.Execute()
if err.Error() != "" {
return fmt.Errorf("error occurred while updating object: %s Response: %s", err.Error(), string(err.Body()))
}Output: Earlier Output: When printing the error |
|
|
||
| {{#operations}} | ||
| import ( | ||
| "bytes" |
There was a problem hiding this comment.
@code-lucidal58 what about using tabs instead of 4-spaces for this line and some other lines below?
There was a problem hiding this comment.
I use tabs. And looks fine in Atom and Intellij. Not sure why it looks different here. Let me try again
|
Looks like there are syntax errors causing build failure: |
…enapi-generator into go-api-return-response
|
All errors fixed @wing328 |
|
Not able to figure out why the circleci build fails. |
|
I think you will need to update the test as well. Here is the error reported by the CI: |
|
All tests passed. If no further feedback/question from anyone, I'll merge it on coming Wed. |
fix #8136
PR checklist
./bin/generate-samples.shto update all Petstore samples related to your fix. 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@antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07)