Skip to content
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

Use errors.Wrap() in repositories.go #299

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

gabriel-samfira
Copy link
Member

The API code unwraps errors wrapped by the errors.Wrap() function. It falls back to 500 error if it can't determine any other error type.

Ultimately we need to migrate to the fmt.Errorf() pattern. But for now at least, we need to return proper errors. Any 500 error will not output details to the API. Neither will 401 for similar reasons.

The API code unwraps errors wrapped by the errors.Wrap() function. It
falls back to 500 error if it can't determine any other error type.

Ultimately we need to migrate to the fmt.Errorf() pattern. But for now
at least, we need to return proper errors. Any 500 error will not output
details to the API. Neither will 401 for similar reasons.

Signed-off-by: Gabriel Adrian Samfira <[email protected]>
@gabriel-samfira gabriel-samfira merged commit 465b12b into cloudbase:main Oct 6, 2024
4 checks passed
@gabriel-samfira gabriel-samfira deleted the use-errors-wrap branch October 6, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant