From 842ba09896dc56df00afec8dc324de2a93cf6356 Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Fri, 30 May 2025 15:24:06 +0200 Subject: [PATCH] refactor: v2 reschedule booking error messages (#21647) --- .../ee/bookings/2024-08-13/services/bookings.service.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts b/apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts index 877ecab424..975e5e4013 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/services/bookings.service.ts @@ -683,12 +683,7 @@ export class BookingsService_2024_08_13 { } return this.outputService.getOutputBooking(databaseBooking); } catch (error) { - if (error instanceof Error) { - if (error.message === "no_available_users_found_error") { - throw new BadRequestException("User either already has booking at this time or is not available"); - } - } - throw error; + this.errorsBookingsService.handleBookingError(error, false); } }