Skip to content

Commit

Permalink
perf: HTTPException is not handled when executing SQL errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amisadmin committed Oct 10, 2023
1 parent 3ab0751 commit 7d3e2cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fastapi_amis_admin/crud/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def error_execute_sql(self, request: Request, error: Exception):
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail="Key already exists",
) from error
elif isinstance(error, HTTPException):
raise error
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail=f"Error Execute SQL:{error}",
Expand Down

0 comments on commit 7d3e2cb

Please sign in to comment.