[BUG][GO][Client] Returned err is never nil
Created by: thiagoarrais
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
Have you tested with the latest master to confirm the issue still exists? -
Have you searched for related issues/PRs? -
What's the actual output vs expected output?
Description
When calling any generated Execute()
function, a non-nil error is always returned. Instead of using the usual Go idiom:
result, _, err := r.Execute()
if err != nil {
/* deal with error */
}
I need to check the actual error message in order to detect errors:
result, _, err := r.Execute()
if err != nil && err.Error() != "" {
/* deal with error */
}
openapi-generator version
c3220848 (current main branch)
Related issues/PRs
I believe this was introduced by #8137. Maybe it is intended behaviour. Care to weigh in here, @code-lucidal58?
Suggest a fix
Successful execution of *Execute()
should not return a non-nil error.