mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #19885 from whiteinge/rest_cherrypy-token-error
Also catch TokenAuthenticationError tracebacks to properly raise a 401
This commit is contained in:
commit
80f9267fca
@ -345,7 +345,8 @@ def hypermedia_handler(*args, **kwargs):
|
||||
try:
|
||||
cherrypy.response.processors = dict(ct_out_map)
|
||||
ret = cherrypy.serving.request._hypermedia_inner_handler(*args, **kwargs)
|
||||
except salt.exceptions.EauthAuthenticationError:
|
||||
except (salt.exceptions.EauthAuthenticationError,
|
||||
salt.exceptions.TokenAuthenticationError):
|
||||
raise cherrypy.HTTPError(401)
|
||||
except cherrypy.CherryPyException:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user