Skip to content

Commit

Permalink
fixed exception issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabrouk committed Sep 12, 2023
1 parent d58e0e2 commit 1e23277
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agenta-backend/agenta_backend/routers/app_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ async def get_variant_by_name(
except ValueError as e:
# Handle ValueErrors and return 400 status code
raise HTTPException(status_code=400, detail=str(e))
except HTTPException as e:
raise e
except Exception as e:
# Handle all other exceptions and return 500 status code
raise HTTPException(status_code=500, detail=str(e))
Expand Down

0 comments on commit 1e23277

Please sign in to comment.