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

proposal: import/errors: structured errors #71980

Closed
borissmidt opened this issue Feb 26, 2025 · 1 comment
Closed

proposal: import/errors: structured errors #71980

borissmidt opened this issue Feb 26, 2025 · 1 comment
Labels
Milestone

Comments

@borissmidt
Copy link

Proposal Details

Currently when we build up errors we get a longer and longer error when we go up the stack.

Ideally we would have structured errors like the slog logger. This would allow us go enrich the error with new attributes to give context.

The advantage of this would be that when you eventually log the error slog could pick up the attributes. It would also become possible to ask the attribute of the error for error handling.

Its still a rough idea and i post this issue to see how the response would be.

@borissmidt borissmidt changed the title proposal: import/path: structured errors proposal: import/errors: structured errors Feb 26, 2025
@gopherbot gopherbot added this to the Proposal milestone Feb 26, 2025
@seankhliao
Copy link
Member

This isn't a concrete proposal (or any proposal at all). The issue tracker is not the place for general discussions.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants