-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Currently, auth errors (Mongo::Auth::InvalidMechanism and Mongo::Auth::Unauthorized) derive from RuntimeError and not from Mongo::Error. As a result, code which rescues Mongo::Error for recovery or defining exception propagation boundaries does not function correctly when auth fails (and the auth exceptions are raised). To fix this:
1. Add the Mongo::Error::AuthError, derived from RuntimeError.
2. Change InvalidMechanism and Unauthorized to derive from Mongo::Error::AuthError.
3. Audit the entire driver for rescues of Mongo::Error and, if appropriate, also rescue AuthError.
- is related to
-
RUBY-1274 Allow Auth error to subclass Mongo::Error
- Backlog