mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
better error reporting in cherrypy
This commit is contained in:
parent
021a028a3e
commit
443a1be16c
1 changed files with 6 additions and 4 deletions
|
@ -863,10 +863,12 @@ def hypermedia_handler(*args, **kwargs):
|
|||
salt.exceptions.AuthorizationError,
|
||||
salt.exceptions.EauthAuthenticationError,
|
||||
salt.exceptions.TokenAuthenticationError,
|
||||
):
|
||||
raise cherrypy.HTTPError(401)
|
||||
except salt.exceptions.SaltInvocationError:
|
||||
raise cherrypy.HTTPError(400)
|
||||
) as e:
|
||||
logger.error(e.message)
|
||||
raise cherrypy.HTTPError(401, e.message)
|
||||
except salt.exceptions.SaltInvocationError as e:
|
||||
logger.error(e.message)
|
||||
raise cherrypy.HTTPError(400, e.message)
|
||||
except (
|
||||
salt.exceptions.SaltDaemonNotRunning,
|
||||
salt.exceptions.SaltReqTimeoutError,
|
||||
|
|
Loading…
Add table
Reference in a new issue