Skip to content

Commit

Permalink
Show rate limit error on booking page instead of general unknown error.
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn committed Sep 16, 2024
1 parent 439ece1 commit 1bf0d72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/appointment/routes/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def read_schedule_availabilities(


@router.put('/public/availability/request')
@limiter.limit("20/minute")
@limiter.limit("0/minute")
def request_schedule_availability_slot(
request: Request,
s_a: schemas.AvailabilitySlotAttendee,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/views/BookingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ const handleError = (data: Exception) => {
if (errorDetail?.id === 'SCHEDULE_NOT_ACTIVE') {
errorHeading.value = '';
errorBody.value = errorDetail.message;
} else if (errorDetail.id === 'RATE_LIMIT_EXCEEDED') {
errorHeading.value = '';
errorBody.value = errorDetail.message;
}
};
Expand Down

0 comments on commit 1bf0d72

Please sign in to comment.