From f7f6e3e30ed70261c5f547fe3d475668a8772bd2 Mon Sep 17 00:00:00 2001 From: sanj <67624670+iodrift@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:37:27 -0700 Subject: [PATCH] Auto-update: Mon Oct 28 12:37:27 PDT 2024 --- sijapi/routers/timing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sijapi/routers/timing.py b/sijapi/routers/timing.py index 3d803e8..96c79ee 100644 --- a/sijapi/routers/timing.py +++ b/sijapi/routers/timing.py @@ -71,14 +71,14 @@ async def post_time_entry_to_timing(entry: Dict): try: async with httpx.AsyncClient() as client: response = await client.post(url, headers=headers, json=entry) - response.raise_for_status() # Raises exception for 4xx/5xx responses + response.raise_for_status() return response.json() except httpx.HTTPStatusError as exc: l.debug(f"HTTPStatusError caught: Status code: {exc.response.status_code}, Detail: {exc.response.text}") - raise HTTPException(status_code=exc.response.status_code, detail=str(exc.response.text)) + raise HTTPException(status_code=exc.response.status_code, detail=exc.response.text) except Exception as exc: l.debug(f"General exception caught: {exc}") - raise HTTPException(status_code=500, detail="An unexpected error occurred") + raise HTTPException(status_code=500, detail=str(exc)) @timing.post("/time/post_old")