Return a 504 response instead of 500 for Salt timeouts

This commit is contained in:
Seth House 2016-11-07 16:23:17 -07:00
parent b77b6bae02
commit 63226aeda6

View File

@ -688,6 +688,8 @@ def hypermedia_handler(*args, **kwargs):
except (salt.exceptions.SaltDaemonNotRunning,
salt.exceptions.SaltReqTimeoutError) as exc:
raise cherrypy.HTTPError(503, exc.strerror)
except (cherrypy.TimeoutError, salt.exceptions.SaltClientTimeout):
raise cherrypy.HTTPError(504)
except cherrypy.CherryPyException:
raise
except Exception as exc: