-
Notifications
You must be signed in to change notification settings - Fork 60
Error handling in atomic_lib - specify and limit error types #11
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
Comments
Types of errors probably look a lot like http errors, since it uses a lot of web concepts
|
AppError in Atomic-Server is pretty bad. It has some unused fields, unnecessary logic. Feels very unfinished. But perhaps it's better to fix that after fixing Atomic-Lib errors, since that's where pretty much all server errors will be coming from. |
Current errors are often too verbose, and I don't have a decent strategy of solving this. Example:
I currently use |
Also, I'd like to standardize these Errors even higher. Maybe introduce an Error class, and maybe give Error types resolvable, persistent IDs. At least I want front-end apps to be more aware of error types. Authentication errors might render a different component, etc. |
I think We'll need Error Resources, which can be properly parsed and shown in the front-end. Maybe this will need to be a new Error type. Or maybe all we need is a different handler in server. Not sure what's the best approach here. |
We now really need accurate status codes, because the front-end needs to know why requests have failed (authorization => retry when there's a new agent signed in). |
Current error is a
dyn Box
, which means it's impossible to expect what kind of error will be emitted. Let's limit with some Enum error type.The text was updated successfully, but these errors were encountered: