diff --git a/program/views.py b/program/views.py index 069d9cc555c9e88919dff3bb70a48c715e9f7747..418bcd2ff5451ed8dd47861de9d48155507dedc5 100644 --- a/program/views.py +++ b/program/views.py @@ -614,11 +614,8 @@ class APIScheduleViewSet( resolution = resolve_conflicts(request.data, pk, show_pk) # FIXME: Find a better way to do this. # The exception is thrown by the instantiate_upcoming_schedule function. - except RRule.DoesNotExist: - return JsonResponse( - {"rruleId": ["Ungültige rrule - Object existiert nicht."]}, - status=status.HTTP_400_BAD_REQUEST, - ) + except RRule.DoesNotExist as exc: + return JsonResponse({"rruleId": str(exc)}, status=status.HTTP_400_BAD_REQUEST) except ScheduleConflictError as exc: return Response(exc.conflicts, status.HTTP_409_CONFLICT)