import { type HttpError } from "@getstrata/core/errors/http"; interface PostgresErrorLike { code?: string; errno?: string | number; constraint?: string; detail?: string; message?: string; } declare function isPostgresError(error: unknown): error is PostgresErrorLike; /** * Constraint violations become 4xx with a fixed message. Anything else is a * 500 with a generic message; the raw driver text never reaches the client. */ declare function mapDatabaseError(error: unknown): HttpError; declare function withDatabaseErrorHandling(operation: () => Promise): Promise; declare function isUniqueConstraintError(error: unknown): boolean; export { isPostgresError, isUniqueConstraintError, mapDatabaseError, withDatabaseErrorHandling };