Mongo.Error exception (mongodb-driver v1.4.0) View Source

Link to this section Summary

Functions

Returns true if the error is issued by the failCommand

Return true if the error == not writable primary or in recovering mode.

Return true if the error is retryable for read operations.

Return true if the error is retryable for writes operations.

Link to this section Types

Specs

t() :: %Mongo.Error{
  __exception__: true,
  code: number(),
  error_info: map(),
  error_labels: [String.t()] | nil,
  fail_command: boolean(),
  host: String.t(),
  message: String.t(),
  not_writable_primary_or_recovering: boolean(),
  resumable: boolean(),
  retryable_reads: boolean(),
  retryable_writes: boolean()
}

Link to this section Functions

Returns true if the error is issued by the failCommand

Link to this function

not_primary_no_secondary_ok?(error)

View Source
Link to this function

not_primary_or_secondary?(error)

View Source
Link to this function

not_writable_primary?(error)

View Source
Link to this function

not_writable_primary_or_recovering?(arg1, opts)

View Source

Return true if the error == not writable primary or in recovering mode.

Link to this function

should_retry_read(error, cmd, opts)

View Source

Return true if the error is retryable for read operations.

Link to this function

should_retry_write(error, cmd, opts)

View Source

Return true if the error is retryable for writes operations.