Skip to content

"There was an error parsing the body" after upgrade to 1.10 #1697

@liferthedude

Description

@liferthedude

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.10

Steps to Reproduce

Hi! We have a number of Python microservices which are built on top of fastapi. We use Sentry for error reporting. THis is how we initialize the sentry integration:

            from sentry_sdk.integrations.starlette import StarletteIntegration
            from sentry_sdk.integrations.fastapi import FastApiIntegration

            sentry_sdk.init(
                dsn=dsn,
                environment=env,
                integrations=[
                    StarletteIntegration(),
                    FastApiIntegration(),
                ],
                traces_sample_rate=0,
                send_default_pii=False,
            )

sentry-sdk was updated today to 1.10 during some of our recent deployments and we started getting "400 Bad request" error for all post requests with text "There was an error parsing the body":

curl -X 'POST' \
>   'http://127.0.0.1:8012/api/tasks/create' \
>   -H 'accept: application/json' \
>   -H 'Content-Type: application/json' \
>   -d '{
>   "environment": "production",
>   "profile": "desktop-windows-10-chrome"
> }'
{"detail":"There was an error parsing the body"}

We reverted sentry-sdk back to 1.9.10 and the error disappeared.

Expected Result

Everything works fine:)

Actual Result

400 Bad request error with text "There was an error parsing the body"

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions