class
SQL.PostgresError
class PostgresError
- readonly code: string
Bun's error code, such as
"ERR_POSTGRES_SERVER_ERROR"or"ERR_POSTGRES_CONNECTION_CLOSED". The server's own code is in errno. - readonly errno?: string
The SQLSTATE that the server sent, such as
"23505"for a unique violation. Not set on errors that Bun raises itself. - static stackTraceLimit: number
The
Error.stackTraceLimitproperty specifies the number of stack frames collected by a stack trace (whether generated bynew Error().stackorError.captureStackTrace(obj)).The default value is
10but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
- targetObject: object,constructorOpt?: Function): void;
Create .stack property on a target object