Merge pull request #37533 from whiteinge/salt-api-504-timeouts

Return a 504 response instead of 500 for Salt timeouts
This commit is contained in:
Mike Place 2016-11-08 13:14:15 +13:00 committed by GitHub
commit 17adbb0c9f

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: