Skip to content

When no type conversion strategy is found on a @Controller handler method bind target, a 500 error code should be returned not a 400. [SPR-5732] #10402

Closed
@spring-projects-issues

Description

@spring-projects-issues

Keith Donald opened SPR-5732 and commented

Original suggestion from Gregor:

For explanation why code 400 code is returned see #10293.
I think generally it should be solved like this:

  • if you registered a suitable converter, and the URL uses date with incorrect format, than the code 400 should be returned, as this is client fault (incorrect format)
  • if you haven't registered any converter, and the URL part must be converted to an object, than it is definitely programmer (server side) fault, and the proper exception should be thrown (MissingConverterException or so), stack trace should be printed, and error code 500 returned.

Currently it seems a code 400 is always sent (even in the second case). This makes it difficult to identify the programmer error.


Affects: 3.0 M3

Issue Links:

Referenced from: commits bf7a947

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions