fix: consolidate reqId and requestId fields

This commit is contained in:
Daniel Hougaard
2024-12-06 01:34:07 +04:00
parent f80023f8f3
commit 623a99be0e
7 changed files with 39 additions and 39 deletions
+4 -4
View File
@@ -51,26 +51,26 @@ export enum ApiErrorTypes {
export type TApiErrors =
| {
requestId: string;
reqId: string;
error: ApiErrorTypes.ValidationError;
message: ZodIssue[];
statusCode: 422;
}
| {
requestId: string;
reqId: string;
error: ApiErrorTypes.UnauthorizedError;
message: string;
statusCode: 401;
}
| {
requestId: string;
reqId: string;
error: ApiErrorTypes.ForbiddenError;
message: string;
details: PureAbility["rules"];
statusCode: 403;
}
| {
requestId: string;
reqId: string;
statusCode: 400;
message: string;
error: ApiErrorTypes.BadRequestError;