mapRequestBodyDecodingException

Maps a failure to read the request body as the route's type to 400 (ServerWebInputException).

Spring's decoder reports such a failure as a DecodingException. A route that binds the body itself, after reading it as a JSON tree (a command route with path or header variables, the command facade), gets Jackson's exception instead; it is wrapped as the decoder wraps it, so the client sees the same error on both kinds of route. An InvalidDefinitionException is the server's (the type cannot be bound at all) and stays unmapped, as in the decoder.