redash
redash copied to clipboard
Redash returns a 500 SERVER error when it can't find a Job.
Issue Summary
We have observed that Redash returns a 500 error, which according to HTTP spec is a server error whenever a user issues an /api/jobs
request for a Job that does not exist. The server logs show a stack trace for a rq.exceptions.NoSuchJobError
error and an HTTP 500 is returned to the client.
Steps to Reproduce
- Issue an
/api/jobs
request for a Job that does not exist - Look in the logs and at the HTTP code that Redash sent you and you'll see a stack trace and a
500
error.
This HTTP response is out of line with the intent of the HTTP 5XX
class of errors. A more appropriate response would be a 4XX
error. The Redash server is handling this request just fine and the "issue", if any, is bad user input. Why not 404
? or even 401
if this is in the category of "does not exist or you are not authorized to access it".
Technical details:
- Redash Version:
redash:10.1.0.b50633
- Browser/OS: N/A
- How did you install Redash: we use Docker Images derived from your base Images.