You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: slots time range validation to zod (#22942)
* chore: Move date range validation to zod, removing TRPCError
* This is not a BAD_REQUEST but an internal error, should not happen
* Add a check to ensure the given start time is before end time
// For dynamic booking, we need to get and update user credentials, schedule and availability in the eventTypeObject as they're required in the new availability logic
188
188
if(!input.eventTypeSlug){
189
-
thrownewTRPCError({
190
-
message: "eventTypeSlug is required for dynamic booking",
191
-
code: "BAD_REQUEST",
192
-
});
189
+
// never happens as it's guarded by our Zod Schema refine, but for clear type safety we throw an Error if the eventTypeSlug isn't given.
190
+
thrownewError("Event type slug is required in dynamic booking.");
0 commit comments