Skip to content

SentrySpringFilter throws InvalidMimeTypeException with an invalid content-type header #4938

@diogoosorio

Description

@diogoosorio

Integration

sentry

Java Version

21

Version

8.27.0

Steps to Reproduce

  1. Create a minimal Spring Boot MVC application and include sentry-spring-boot-starter-jakarta (or just use this one)
  2. Define a sentry.max-request-body-size=medium value
  3. curl -X POST --header "Content-Type: invalid" --location "http://localhost:8080/demo" --data "{}"
  4. See that a 500 is returned because SentrySpringFilter fails to parse the content-type header

Expected Result

The request to go through the Sentry filter and for downstream filters / wtv... to handle the decision if the reported body format is an acceptable one.

Actual Result

The filter throws an exception -> 500 error.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions