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

[ENHANCEMENT] Improve the error propagation and define a standard structure to handle them #28

Open
NishantJoshi00 opened this issue Nov 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@NishantJoshi00
Copy link
Member

Description

Due to error-stack its easy to simply change the context and propagate errors without much effort, but this definitely reduces the quality of the error propagation as there is no strict standard that the errors need to adhere to.
This issue addresses this discussing upon a more standardized way of handling error removing change_context from the code based promoting a more declarative way of error handling instead of the current imperative way.

Possible Approaches

  • Wrap the current error into a custom defined struct, create a specific context for all the layers/APIs and then define TryFrom implementation for them, internally handling the change contexts
@NishantJoshi00 NishantJoshi00 added the enhancement New feature or request label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant