Mongo.Error exception (mongodb-driver v0.8.0) View Source

Link to this section Summary

Functions

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__: term(),
  code: number(),
  error_labels: [String.t()] | nil,
  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

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?(error, 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.