sanic-org / sanic

Accelerate your web app development | Build fast. Run fast.

Home Page:https://sanic.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Headers from Exceptions

ahopkins opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Headers set on Exception objects not carried through on all renderers

Code snippet

raise Unauthorized(
    "Auth required.",
    headers={"foo": "bar"},
)

Expected Behavior

Response should have:

Foo: bar

How do you run Sanic?

Sanic CLI

Operating System

all

Sanic Version

23.3

Additional context

No response