-
-
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
[GO][Client] return GenericOpenAPIError instead of error in Execute() #8137
[GO][Client] return GenericOpenAPIError instead of error in Execute() #8137
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 |
@@ -3,6 +3,7 @@ package {{packageName}} | |||
|
|||
{{#operations}} | |||
import ( | |||
"bytes" |
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.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use tabs. And looks fine in Atom and Intellij. Not sure why it looks different here. Let me try again
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.
done
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.sh
to 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)