Skip to content

Error handling of invalid content-type #7053

@janotav

Description

@janotav

Environment Details

  • Helidon Version: 2.6.0
  • Helidon SE
  • JDK version: 17
  • OS: Linux
  • Docker version (if applicable):

Problem Description

Sending POST request with invalid content-type %{bad actor}

Leads to java.lang.IllegalArgumentException in the server log and on the client side the observed behaviour is:

  • 400 Bad Request
  • content: Could not parse '%{bad actor}'

Expected behaviour

We would like to:

  • be able to control response status & content
  • avoid Unexpected error occurred during routing! exception in our server log

Is that currently possible? If not, can this be added?

Metadata

Metadata

Assignees

Labels

2.xIssues for 2.x version branchSEquestionFurther information is requestedwebserver

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions