fix: update error handling in validateBookingTimeIsNotOutOfBounds function to use HttpError (#20386)
This commit is contained in:
1 parent
596e9b4e5a
commit
7aa1d8035c
1 file changed
+1
-1
+1
-1
@@ -52,5 +52,5 @@ export const validateBookingTimeIsNotOutOfBounds = async <T extends ValidateBook
|
||||
}
|
||||
}
|
||||
|
||||
if (timeOutOfBounds) throw new Error(ErrorCode.BookingTimeOutOfBounds);
|
||||
if (timeOutOfBounds) throw new HttpError({ statusCode: 400, message: ErrorCode.BookingTimeOutOfBounds });
|
||||
};
|
||||
Reference in new issue
Block a user