diff --git a/mistral/context.py b/mistral/context.py index 455e0b34..c404fb9b 100644 --- a/mistral/context.py +++ b/mistral/context.py @@ -207,7 +207,11 @@ class AuthHook(hooks.PecanHook): else: msg = 'Authentication required' - pecan.abort(status_code=401, detail=msg) + pecan.abort( + status_code=401, + detail=msg, + headers={'Server-Error-Message': msg} + ) class ContextHook(hooks.PecanHook):