Skip to content

Spring MVC raises MissingPathVariableException resulting in 500 instead of 400 error when path segment is u001F or u00D and cannot be converted to target type UUID #31382

@ltsallas

Description

@ltsallas

This is an corner case, discovered while performing some property-based testing for my API.

Affects spring-web:6.0.12

Here is a minimal code sample that reproduces the issue

https://gist.github.com/ltsallas/9903343b6b7a90013cdd155bfcd670ce

I think the the last two tests in the DemoControllerTest should return a 400(MethodArgumentTypeMismatchException) and not a 500(MissingPathVariableException) response.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions