Skip to content

Conversation

y1yang0
Copy link
Contributor

@y1yang0 y1yang0 commented Sep 28, 2025

This patch improves the error handling package with several key changes:

  • Adds comprehensive documentation
  • Includes a unit test
  • Strictly differentiates between error wrapping APIs (like Wrapf), which add a stack trace to an existing error, and error creation APIs (like Newf), which create a new error from scratch with a stack trace. This makes their intended use clear and prevents misuse.


## Error Handling

We use the `ex` package to handle errors as we want to include the stack trace
Copy link
Member

Choose a reason for hiding this comment

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

Should not be this file updated instead of removing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea is to focus our efforts on maintaining the documentation that lives closer to the code, instead of dealing with the overhead of keeping two redundant files in sync.

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

Successfully merging this pull request may close these issues.

2 participants