prisma-error-formatter
Version:
A flexible and customizable Prisma error formatter to simplify and unify error handling in Prisma Client applications.
17 lines (16 loc) • 523 B
TypeScript
import { HttpException } from "@nestjs/common";
export interface HttpErrorResponse {
success: boolean;
message: string;
errorMessages: Array<{
path: string;
message: string;
}>;
}
export interface ParsedHttpError {
path: string;
message: string;
}
export declare function parseHttpException(exception: HttpException): ParsedHttpError[];
export declare function isNestJsHttpException(exception: unknown): boolean;
export declare function getExceptionType(exception: unknown): string;