Exceptions: corrected Mounting error in server exception handling
This commit is contained in:
@@ -63,8 +63,8 @@ def register_exception_handlers(app) -> None:
|
||||
@app.exception_handler(MountingFailed)
|
||||
async def mounting_failed_handler(request: Request, exc: MountingFailed) -> JSONResponse:
|
||||
return JSONResponse(
|
||||
status_code=api_status.HTTP_404_NOT_FOUND,
|
||||
content=_error_payload(code="MOUNTING_FAILED", message=str(exc)),
|
||||
status_code=api_status.HTTP_409_CONFLICT,
|
||||
content=_error_payload(code="MOUNTING_FAILED", message=str(exc) or "Failed to mount sample"),
|
||||
)
|
||||
|
||||
@app.exception_handler(UnmountingFailed)
|
||||
|
||||
Reference in New Issue
Block a user