fix: update error handling in validateBookingTimeIsNotOutOfBounds function to use HttpError (#20386)

This commit is contained in:
Udit Takkar
2025-03-26 17:24:33 +00:00
committed by GitHub
parent 596e9b4e5a
commit 7aa1d8035c
@@ -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 });
};