Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanic can't show request.header content #720

Closed
jiamo opened this issue Jun 16, 2020 · 4 comments · Fixed by getsentry/sentry-docs#1756
Closed

sanic can't show request.header content #720

jiamo opened this issue Jun 16, 2020 · 4 comments · Fixed by getsentry/sentry-docs#1756

Comments

@jiamo
Copy link

jiamo commented Jun 16, 2020

After

sentry_sdk.init(
    dsn=user_config['SENTRY_DSN'],
    integrations=[SanicIntegration()],
)

and capture_exception(exception)

But the browser can't see the request.header (which is a dict value)

request body can be show but in such warning like

image

The first discared value is a part of request.header

@untitaker
Copy link
Member

Which version of Sanic are you using? We just do dict(request.headers) and the Sanic documentation does not indicate that those headers are structured/parsed in any way.

@jiamo
Copy link
Author

jiamo commented Jun 16, 2020

sanic 20.3

@untitaker
Copy link
Member

We only support LTS versions of Sanic. I will make this more clear in the docs but see sanic-org/sanic#1532 for more info.

@untitaker
Copy link
Member

There's a doc PR open which will update the supported versions.

I would suggest to report this bug against Sanic since this seems like something entirely unintended on their end. In that case I would also attach a small repro case though.

For reference here is what we do to sanic's request headers:

request_info["headers"] = _filter_headers(dict(request.headers))

We literally just call dict() on them and get this back, apparently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants