redash icon indicating copy to clipboard operation
redash copied to clipboard

Redash returns a 500 SERVER error when it can't find a Job.

Open superwesman opened this issue 5 months ago • 0 comments

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

  1. Issue an /api/jobs request for a Job that does not exist
  2. 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.

superwesman avatar Sep 10 '24 14:09 superwesman