Skip to content

Conversation

colesnodgrass
Copy link
Member

  • introduce a LocalError type
    • combines an error message with a help message
  • migrate all the existing errors with help messages to this type

@colesnodgrass colesnodgrass requested a review from a team as a code owner August 30, 2024 21:10
var _ error = (*LocalError)(nil)

// LocalError adds a user-friendly help message to specific errors.
type LocalError struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be better as an interface, which we could implement on any custom error types we have. hmmm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I debated that as well, but didn't see a need for it yet. It would be easy enough to change if we decide to do that later.

@colesnodgrass colesnodgrass merged commit 29e37a4 into main Aug 30, 2024
2 checks passed
@colesnodgrass colesnodgrass deleted the cole/clean-up-errors branch August 30, 2024 21:21
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.

2 participants