We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 999b5d4 + 5c6b9be commit 3f8bbdbCopy full SHA for 3f8bbdb
spring-web/src/main/java/org/springframework/web/bind/MissingPathVariableException.java
@@ -1,5 +1,5 @@
1
/*
2
- * Copyright 2002-2022 the original author or authors.
+ * Copyright 2002-2023 the original author or authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ public final MethodParameter getParameter() {
88
89
@Override
90
public HttpStatusCode getStatusCode() {
91
- return HttpStatus.INTERNAL_SERVER_ERROR;
+ return (isMissingAfterConversion() ? HttpStatus.BAD_REQUEST : HttpStatus.INTERNAL_SERVER_ERROR);
92
}
93
94
0 commit comments