Return the remote error, if there's an error

This commit is contained in:
Scott Wallace 2023-09-09 15:55:07 +01:00
parent 45202720ca
commit 49a50a0edd
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -28,6 +28,9 @@ def process() -> Response:
hours = int(request.args.get("hours", "0")) hours = int(request.args.get("hours", "0"))
mins = int(request.args.get("mins", "0")) mins = int(request.args.get("mins", "0"))
if orig.status_code != 200:
return Response(orig.text, headers=orig.headers, status=orig.status_code)
orig_cal = Calendar.from_ical(orig.text) orig_cal = Calendar.from_ical(orig.text)
cal = Calendar() cal = Calendar()