runpod-python icon indicating copy to clipboard operation
runpod-python copied to clipboard

sls | Return FAILURE status to client when internal `_handle_result` fails

Open kunibald413 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Client gets response with status "COMPLETED" without any response data that the handler is adding. This message is then observed in the sls logs:

 "message": "Failed to return job results. | 400, message='Bad Request'

https://github.com/runpod/runpod-python/blob/f6971a8f142a7b4796fb0f1ffa3b3f201d130a81/runpod/serverless/modules/rp_http.py#L54

Describe the solution you'd like Return status "FAILED" to the client when it fails to return job results. Maybe also with a message saying "internal error". If feasible return more descriptive message on why it failed.

Additional context Asked the client to provide the request json and upon requesting myself did not run into the issue. Response had the expected data. The expected data is a base64 string of audio.

If the handler implementation should validate the data, in what way would the data need to be validated in order too prevent this issue?

Python 3.10.13 runpod version: 1.6.2

kunibald413 avatar Apr 15 '24 10:04 kunibald413