Base error class for all Mongo related errors.
@since 2.0.0
| CODE | = | 'code'.freeze |
The error code field.
@since 2.0.0 |
|
| ERR | = | '$err'.freeze |
An error field, MongoDB < 2.6
@since 2.0.0 |
|
| ERROR | = | 'err'.freeze |
An error field, MongoDB < 2.4
@since 2.0.0 |
|
| ERRMSG | = | 'errmsg'.freeze |
The standard error message field, MongoDB 3.0+
@since 2.0.0 |
|
| WRITE_ERRORS | = | 'writeErrors'.freeze |
The constant for the writeErrors array.
@since 2.0.0 |
|
| WRITE_CONCERN_ERROR | = | 'writeConcernError'.freeze |
The constant for a write concern error.
@since 2.0.0 |
|
| WRITE_CONCERN_ERRORS | = | 'writeConcernErrors'.freeze |
The constant for write concern errors.
@since 2.1.0 |
|
| UNKNOWN_ERROR | = | 8.freeze |
Constant for an unknown error.
@since 2.0.0 |
|
| BAD_VALUE | = | 2.freeze |
Constant for a bad value error.
@since 2.0.0 |
|
| CURSOR_NOT_FOUND | = | 'Cursor not found.' |
Constant for a Cursor not found error.
@since 2.2.3 |
|
| UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL | = | 'UnknownTransactionCommitResult'.freeze |
Error label describing commitTransaction errors
that may or may not occur again if a commit is manually retried by the
user.
@since 2.6.0 |
|
| TRANSIENT_TRANSACTION_ERROR_LABEL | = | 'TransientTransactionError'.freeze |
Error label describing errors that will likely not
occur if a transaction is manually retried from the start.
@since 2.6.0 |
Can the change stream on which this error occurred be resumed, provided the operation that triggered this error was a getMore?
@example Is the error resumable for the change stream?
error.change_stream_resumable?
@return [ true, false ] Whether the error is resumable.
@since 2.6.0
Does the error have the given label?
@example
error.label?(label)
@param [ String ] label The label to check if the error has.
@return [ true, false ] Whether the error has the given label.
@since 2.6.0