Error Handling Issue: Updating Response Status in Python’s Runpod
Hello everyone! I encountered an issue where I need to raise an error in my handler, but I’ve found that in the Python’s runpod library, errors are added to a
job_output list. There’s a condition where it searches for the error field to update the response status to FAILED. However, since the error is within an output list, it doesn’t recognize that field, and the status remains COMPLETED.
This is my handler and here is where I raise the error
and this is the Runpod code
Any insights would be greatly appreciated!4 Replies
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Yeah if you throw the exception, the SDK will handle it automatically, probably has something to do with yielding the error, I haven't had experience with that.
Thanks for the answers, I was guiding me by the runpod doc https://docs.runpod.io/serverless/workers/handlers/handler-error-handling to implement a custom error response. I going to keep trying.
Handling Errors | RunPod Documentation
Learn how to handle exceptions and implement custom error responses in your RunPod SDK handler function, including how to validate input and return customized error messages.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View