Skip to content

Throw proper exception when request parsing fails #31

@JanHolger

Description

@JanHolger

Currently calling the .body method (or injecting it) and sending invalid content to the endpoint throws a generic java.text.ParseException or MapperWrongTypeException from abstract-data. The stacktrace is hard to debug since it doesn't contain any context (endpoint, invalid data, etc.)

Instead we should throw an exception that contains more context and can be properly handled in the exception handler and responded to.

  1. Invalid request body throws a specific exception
  2. The default exception handler, responds with 400

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions