@iamcalegari/mongoat / MongoatConnectionError
Class: MongoatConnectionError
Defined in: src/errors/index.ts:93
Erro de conexão: Database não conectada, dbName ausente, sessão de transação indisponível.
code default: 'NOT_CONNECTED' — override pontual disponível (ex.: MISSING_DB_NAME).
Extends
Constructors
Constructor
new MongoatConnectionError(
message,options?):MongoatConnectionError
Defined in: src/errors/index.ts:94
Parameters
message
string
options?
cause?
unknown
code?
string
Returns
MongoatConnectionError
Overrides
Properties
code
readonlycode:string
Defined in: src/errors/index.ts:23
Inherited from
suppressed?
optionalsuppressed?:unknown[]
Defined in: src/errors/index.ts:38
Errors from secondary, best-effort operations that failed while this error was being handled — never the primary cause of failure. Absent (undefined) unless at least one secondary failure was recorded; the array can accumulate more than one entry across a single error's lifecycle.
Each entry is the raw error captured from the secondary operation, not sanitized. Never serialize a MongoatError (or this field alone) with JSON.stringify — the same discipline already applied to .cause.