chore: improve error message (#21112)
This commit is contained in:
1 parent
49a2f4d4f7
commit
ad707b0ee4
3 files changed
+3
-1
No files matched your search
@@ -1415,7 +1415,7 @@ async function handler(
|
||||
err.message
|
||||
);
|
||||
if (err.code === "P2002") {
|
||||
throw new HttpError({ statusCode: 409, message: "booking_conflict" });
|
||||
throw new HttpError({ statusCode: 409, message: ErrorCode.BookingConflict });
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
@@ -17,4 +17,5 @@ export enum ErrorCode {
|
||||
UpdatingOauthClientError = "updating_oauth_client_error",
|
||||
CreatingOauthClientError = "creating_oauth_client_error",
|
||||
BookingTimeOutOfBounds = "booking_time_out_of_bounds_error",
|
||||
BookingConflict = "booking_conflict_error",
|
||||
}
|
||||
Reference in new issue
Block a user