fix: update error handling in validateBookingTimeIsNotOutOfBounds function to use HttpError (#20386)
This commit is contained in:
+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