Skip to content

Commit 3f8bbdb

Browse files
committed
Merge branch '6.0.x'
2 parents 999b5d4 + 5c6b9be commit 3f8bbdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-web/src/main/java/org/springframework/web/bind/MissingPathVariableException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ public final MethodParameter getParameter() {
8888

8989
@Override
9090
public HttpStatusCode getStatusCode() {
91-
return HttpStatus.INTERNAL_SERVER_ERROR;
91+
return (isMissingAfterConversion() ? HttpStatus.BAD_REQUEST : HttpStatus.INTERNAL_SERVER_ERROR);
9292
}
9393

9494
}

0 commit comments

Comments
 (0)