Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Include argument name inMethodArgumentTypeMismatchException error message #33573

Closed
Assignees
simonbasle
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement
Milestone
@vpavic

Description

@vpavic

Using the latest release (6.1.13), whenMethodArgumentTypeMismatchException happens, something like this is logged at warn level:

Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.time.OffsetDateTime'; Failed to convert from type [java.lang.String] to type [@org.springframework.web.bind.annotation.RequestParam @org.springframework.format.annotation.DateTimeFormat java.time.OffsetDateTime] for value [2024-09-09T8:30:00+02:00]]

It would be very useful to also log the name of the argument which caused the error, because sometimes there are multiple handler method arguments of the same type that are subject to the same conversion. I guess this means that error message should be put together inMethodArgumentTypeMismatchException rather than relying onTypeMismatchException (which does not have the necessary context).

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


    [8]ページ先頭

    ©2009-2025 Movatter.jp