Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 opened this issue May 8, 2009 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented May 8, 2009

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

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Fixed :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants