goharbor-client icon indicating copy to clipboard operation
goharbor-client copied to clipboard

Swagger generated error not handled on the client shows a memory address

Open xoanmi opened this issue 1 year ago • 1 comments

Describe the bug

The generated error not handled on the client shows a memory address. For instance:

  • GET /projects/{project_name_or_id}][401] getProjectUnauthorized &{Errors:[0x140003c42c0]

To Reproduce

Force any error not handled on the handleSwaggerXYZErrors() functions.

Expected behaviour

The error generated by swagger is a proper string and does not include memory addresses.

xoanmi avatar Feb 13 '24 11:02 xoanmi

This may be the autogenerated code causing the issue:

https://github.com/mittwald/goharbor-client/blob/master/apiv2/internal/api/client/project/get_project_responses.go#L100-L102

xoanmi avatar Feb 13 '24 11:02 xoanmi