-
Notifications
You must be signed in to change notification settings - Fork 108
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
Better names and higher granularity for errors #519
Comments
What other drivers do for it and the question is if we need to conform into a practice that all drivers agreed upon? |
With drivers, error handling depends strongly on the language used.
What this issue is about is not making error handling in Rust driver "conformant" to other drivers (because there's no such convention whatsoever), yet it is about changes to the error types hierarchy to make it more reasonable. |
@muzarski / @wprzytula what are the minimal set of errors we would like to handle for this for the 0.14.0 milestone or in general as the "API breaking" item. In any case, if easy let's divide them to issues under an umbrella issue and target them to milestones. |
In the Rust world, all alterations to current errors must be, unfortunately, considered API-breaking. Only after the introduced changes will the error framework be well-suited for changes in a non-API-breaking way. That means that we must do that before 1.0. |
Problem statement
There are quite a few places in driver's code where the errors' names and/or messages are inappropriate. Unjustified
ProtocolError
's usage is prevalent. We lack an error for faults triggered by user's logic, such as unwise customRetryPolicy
being used.Proposed solution
Add more error variants (mainly for
QueryError
), fix the usaged to make names and messages appropriate. Stop abusingProtocolError
when no guilt is on received messages.The text was updated successfully, but these errors were encountered: