/** Serialize an arbitrary thrown value for durable storage in a job's `error_payload`. * * A bare `{ message, stack }` capture is a diagnostics trap: wrapper errors hide the * root cause. Drizzle throws `DrizzleQueryError` whose `.message` is only the failed * SQL text; the real `PostgresError` — carrying `code`/`detail`/`constraint`/`table` * — lives on `.cause`. This walks the full `cause` chain and copies each error's * own-enumerable properties (where both Drizzle's `query` and Postgres' fields live), * so a dead-lettered job records *why* it failed, not just *which query* failed. * * Non-Error values pass through unchanged. Circular `cause` references are broken. */ export declare function serializeError(error: unknown): unknown; //# sourceMappingURL=serialize-error.d.ts.map