isTransientPersistenceError
isTransientPersistenceError(
error):boolean
Defined in: packages/ddd-mikro-orm/src/errors/transient-error.ts:38
Persistence-adapter classifier for driver/network failures that are reasonable to retry. This function is infrastructure-only; application handlers consume TransientOperationError instead of importing this classifier.
An error is transient when its code is one of:
- a retryable PostgreSQL SQLSTATE: serialization failure
40001, deadlock40P01, lock not available55P03, shutdown57P01–57P03, or any code in the connection-exception (08) or insufficient-resource (53) class; - a Node network error:
ECONNREFUSED,ECONNRESET,EHOSTUNREACH,ENETUNREACH,EPIPEorETIMEDOUT; SQLITE_BUSYorSQLITE_LOCKED;
or when its name is TaskCancelledError or TimeoutError. A wrapped error
is classified through its cause chain, which may be cyclic.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean