mirror of
https://github.com/clearml/clearml-serving
synced 2025-01-31 02:46:54 +00:00
Fix internal ValueError exception should return 422 (not 404 as before)
This commit is contained in:
parent
02fef01657
commit
368a03dc70
@ -89,7 +89,7 @@ async def serve_model(model_id: str, version: Optional[str] = None, request: Uni
|
||||
request_body=request
|
||||
)
|
||||
except ValueError as ex:
|
||||
raise HTTPException(status_code=404, detail="Error processing request: {}".format(ex))
|
||||
raise HTTPException(status_code=422, detail="Error processing request: {}".format(ex))
|
||||
except Exception as ex:
|
||||
raise HTTPException(status_code=500, detail="Error processing request: {}".format(ex))
|
||||
return return_value
|
||||
|
Loading…
Reference in New Issue
Block a user