Innopolis University DevOps Playground
Skip to content

Return http error status on wrong request for image/audio/task result

Right now, if we ask for ImageProcessingResult on /audio/result route server will throw 500 status code (server error).

Change this behaviour to returning 422 status code everywhere: if user ask for ImageProcessingResult on /audio/result or /task/result, AudioProcessingResult on /image/result or /task/result etc

Catch pydantic.error_wrappers.ValidationError and raise HTTPException

Edited by Anton Kudryavtsev