/** PostgreSQL SQLSTATE codes representing a CLIENT error (HTTP 400) - caused by the request/data, not a server fault. @see https://www.postgresql.org/docs/current/errcodes-appendix.html */ export declare const PostgresErrorCodes: { readonly DATA_EXCEPTION: "22000"; readonly STRING_DATA_TOO_LONG: "22001"; readonly NUMERIC_VALUE_OUT_OF_RANGE: "22003"; readonly NULL_VALUE_NOT_ALLOWED: "22004"; readonly INVALID_DATETIME_FORMAT: "22007"; readonly DATETIME_FIELD_OVERFLOW: "22008"; readonly INVALID_TIME_ZONE_DISPLACEMENT_VALUE: "22009"; readonly SUBSTRING_ERROR: "22011"; readonly DIVISION_BY_ZERO: "22012"; readonly INVALID_PARAMETER_VALUE: "22023"; readonly INVALID_ESCAPE_SEQUENCE: "22025"; readonly STRING_DATA_LENGTH_MISMATCH: "22026"; readonly DUPLICATE_JSON_OBJECT_KEY_VALUE: "22030"; readonly INVALID_JSON_TEXT: "22032"; readonly FLOATING_POINT_EXCEPTION: "22P01"; readonly INVALID_TEXT_REPRESENTATION: "22P02"; readonly INVALID_BINARY_REPRESENTATION: "22P03"; readonly UNTRANSLATABLE_CHARACTER: "22P05"; readonly INTEGRITY_CONSTRAINT_VIOLATION: "23000"; readonly RESTRICT_VIOLATION: "23001"; readonly NOT_NULL_VIOLATION: "23502"; readonly FOREIGN_KEY_VIOLATION: "23503"; readonly UNIQUE_VIOLATION: "23505"; readonly CHECK_VIOLATION: "23514"; readonly EXCLUSION_VIOLATION: "23P01"; readonly WITH_CHECK_OPTION_VIOLATION: "44000"; }; /** SQLSTATE classes (first two chars) mapped to HTTP 400; codes without a specific message use {@link DATABASE_CLIENT_ERROR_FALLBACK_MESSAGE}. Deliberately excluded (stay 500): 42, 53, 0A, 25, 28, 21, 54; class 40 is transient/retryable, NOT a 400. */ export declare const POSTGRES_CLIENT_ERROR_CLASSES: readonly string[]; /** Human-readable message per specific SQLSTATE code. */ export declare const DATABASE_CLIENT_ERROR_MESSAGES: Record; /** Fallback message for a client-class (22/23/44) error that has no specific message above. */ export declare const DATABASE_CLIENT_ERROR_FALLBACK_MESSAGE = "Invalid database request"; /** SQLSTATE codes for transient, retryable transaction conflicts (-> HTTP 409) - the transaction lost a concurrency race, not bad input (400) and not a server bug (500). */ export declare const POSTGRES_RETRYABLE_ERROR_CODES: readonly string[]; /** Safe, generic message + stable code for a retryable DB conflict (never leaks internals). */ export declare const DATABASE_RETRYABLE_ERROR_MESSAGE = "The request conflicted with a concurrent operation; please retry."; export declare const DATABASE_RETRYABLE_ERROR_CODE: string; /** The branch a thrown value takes through the handler. */ export declare class ApplicationErrorTypes { static readonly DATABASE_CLIENT = "database-client"; static readonly DATABASE_RETRYABLE = "database-retryable"; static readonly INTENTIONAL = "intentional"; static readonly UNEXPECTED = "unexpected"; } //# sourceMappingURL=definition.d.ts.map