Exceptions: corrected Mounting error in server exception handling

This commit is contained in:
2026-05-08 13:10:46 +02:00
parent 5d60ebf4ef
commit ad5d0ab667
+2 -2
View File
@@ -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)