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

[error] A more complex error interface #76

Open
1 task
at15 opened this issue Aug 4, 2018 · 0 comments
Open
1 task

[error] A more complex error interface #76

at15 opened this issue Aug 4, 2018 · 0 comments

Comments

@at15
Copy link
Member

at15 commented Aug 4, 2018

The default error interface is simple Error() string, however, it is too general and makes error handling non trivial, user have to rely on inspect string/type assertion/compare with global variable. Some use cases

  • error code, might just add ErrorCode to the general interface and give code to common std library errors
  • [error] Allow find cause and inspect error without checking key words in error message #66 error class/kind, i.e. network, encoding etc.
  • reason, this is already of solved by using Wrap
  • [error] Human readable suggestions for possible solutions #73 solution, some errors are simple but common, might just write the solution there, just like when you do brew install it will suggest you run certain command when there are certain errors.
  • error tracking system like sentry, I remember I have a survey/issue for those stuff somewhere
  • a generic http retry client, not all error are retryable, i.e. a 500 could also contains a valid response for application specific error, it would be good to have a ShouldRetry

Related

@at15 at15 added this to the 0.0.8 milestone Aug 9, 2018
@at15 at15 modified the milestones: 0.0.9, 0.0.10 Dec 31, 2018
at15 added a commit that referenced this issue Apr 13, 2019
- the implementation and interface are still subject to change
@at15 at15 modified the milestones: 0.0.10, 0.0.12 Apr 13, 2019
@at15 at15 modified the milestones: 0.0.13, future Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant