Skip to content

feat: add ErrorWithDetail #228

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

Merged
merged 4 commits into from
Dec 9, 2024
Merged

feat: add ErrorWithDetail #228

merged 4 commits into from
Dec 9, 2024

Conversation

dylanhitt
Copy link
Collaborator

Closes #225

Adds ErrorWithDetail interface to allow for response of detail. This is similar to the older with Info. The motivation for this is the fact that we use the detail option in the slog.Error in the default error handler as well as in the HTTPError.Error() func. Maybe we should default into something as well in the case where the user doesn't supply it.

If this is acceptable I will update the docs now as well.

@dylanhitt
Copy link
Collaborator Author

@EwenQuim should I update the docs?

@dylanhitt dylanhitt force-pushed the ErrorWithDetail branch 2 times, most recently from a70e700 to 41ab130 Compare December 5, 2024 20:53
@dylanhitt
Copy link
Collaborator Author

I’ll update the docs as well tomorrow.

@dylanhitt dylanhitt force-pushed the ErrorWithDetail branch 2 times, most recently from 27fbf60 to b39acd7 Compare December 6, 2024 19:01
@dylanhitt
Copy link
Collaborator Author

@EwenQuim if you don't mind looking at the doc updates that would be great. I'm not the best writer.

@EwenQuim
Copy link
Member

EwenQuim commented Dec 6, 2024

I'm not the best writer.

If you're not the best writer, then I'm a terrible one. The doc update is great!

@dylanhitt
Copy link
Collaborator Author

@EwenQuim you mind taking another look. Trying to clear my backlog

@EwenQuim
Copy link
Member

EwenQuim commented Dec 9, 2024

Nice, thanks!

Yes don't worry, Fuego is very active at the moment. But that's a good sign!

We'll be taking a break during winter holidays.

@dylanhitt dylanhitt merged commit f42f6eb into main Dec 9, 2024
5 checks passed
@dylanhitt dylanhitt deleted the ErrorWithDetail branch December 9, 2024 17:17
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.

Add Unwrap to ErrorWithStatus interface
2 participants