Skip to content

Commit 7d3e2cb

Browse files
committed
perf: HTTPException is not handled when executing SQL errors
1 parent 3ab0751 commit 7d3e2cb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fastapi_amis_admin/crud/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ def error_execute_sql(self, request: Request, error: Exception):
216216
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
217217
detail="Key already exists",
218218
) from error
219+
elif isinstance(error, HTTPException):
220+
raise error
219221
raise HTTPException(
220222
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
221223
detail=f"Error Execute SQL:{error}",

0 commit comments

Comments
 (0)