mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-30 04:30:13 +00:00
add 500 code
This commit is contained in:
parent
40779bf1e5
commit
42fb9c7d16
11 changed files with 30 additions and 30 deletions
|
|
@ -85,7 +85,7 @@ async def create_config(config: ConfigCreate, session: Session = Depends(session
|
|||
except Exception as e:
|
||||
session.rollback()
|
||||
logger.error("Config creation failed", extra={"user_id": user_id, "config_name": config.config_name, "error": str(e)}, exc_info=True)
|
||||
raise
|
||||
raise HTTPException(status_code=500, detail="Internal server error")
|
||||
|
||||
|
||||
@router.put("/configs/{config_id}", name="update config", response_model=ConfigOut)
|
||||
|
|
@ -131,7 +131,7 @@ async def update_config(
|
|||
except Exception as e:
|
||||
session.rollback()
|
||||
logger.error("Config update failed", extra={"user_id": user_id, "config_id": config_id, "error": str(e)}, exc_info=True)
|
||||
raise
|
||||
raise HTTPException(status_code=500, detail="Internal server error")
|
||||
|
||||
|
||||
@router.delete("/configs/{config_id}", name="delete config")
|
||||
|
|
@ -153,7 +153,7 @@ async def delete_config(config_id: int, session: Session = Depends(session), aut
|
|||
except Exception as e:
|
||||
session.rollback()
|
||||
logger.error("Config deletion failed", extra={"user_id": user_id, "config_id": config_id, "error": str(e)}, exc_info=True)
|
||||
raise
|
||||
raise HTTPException(status_code=500, detail="Internal server error")
|
||||
|
||||
|
||||
@router.get("/config/info", name="get config info")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue