quarkusio/quarkus · error · WebApplicationException
Missing required param in method '<method>'
Error message
Missing required param in method '<method>'
What it means
SpringWebRequestParamHandler is a RESTEasy Reactive request filter installed when Spring-style required request parameter enforcement is active. In RESOLVE_METHOD_PARAMETERS phase it checks the query parameter map; if it is empty while the resource method declares required params, it throws a 400 Bad Request WebApplicationException naming the resource method.
Source
Thrown at extensions/spring-web/resteasy-reactive/runtime/src/main/java/io/quarkus/spring/web/resteasy/reactive/runtime/SpringRequestParamHandler.java:32
import org.jboss.resteasy.reactive.server.spi.ServerRestHandler;
/**
* In Spring, parameters annotated with {@code @RequestParam} are required by default unless explicitly marked as
* optional.
* This {@link SpringRequestParamHandler} enforces the required constraint responding with a BAD_REQUEST status.
*
*/
public class SpringRequestParamHandler implements HandlerChainCustomizer {
@Override
public List<ServerRestHandler> handlers(HandlerChainCustomizer.Phase phase, ResourceClass resourceClass,
ServerResourceMethod resourceMethod) {
if (phase == Phase.RESOLVE_METHOD_PARAMETERS) {
return Collections.singletonList(new ServerRestHandler() {
@Override
public void handle(ResteasyReactiveRequestContext requestContext) throws Exception {
Map<String, List<String>> parametersMap = requestContext.serverRequest().getQueryParamsMap();
if (parametersMap.isEmpty()) {
throw new WebApplicationException("Missing required param in method '" + resourceMethod.getName() + "'",
Response.Status.BAD_REQUEST);
}
}
});
}
return Collections.emptyList();
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Send the required query parameters, e.g. GET /endpoint?name=value.
- Mark the Spring @RequestParam as required = false and supply a defaultValue if the param is genuinely optional.
- Fix the client code or proxy/gateway that strips the query string.
Example fix
// before (client) GET /search // after GET /search?q=quarkus // or relax the param: before @RequestParam String q // after @RequestParam(required = false, defaultValue = "") String q
Defensive patterns
Strategy: try-catch
Validate before calling
// client-side pre-check before calling the endpoint
if (!url.includes('?') || new URLSearchParams(url.split('?')[1]).size === 0) {
throw new Error('required query params missing for ' + endpoint);
} Try / catch
try {
Response r = client.send(req);
} catch (WebApplicationException e) {
if (e.getResponse().getStatus() == 400) {
// fix request: append required query parameters
} else throw e;
} Prevention
- Document required query params in OpenAPI annotations so clients generate them.
- Add client-side contract tests asserting the query string is present.
- Use required=false + defaultValue only when the param is truly optional.
When it happens
Trigger: Calling a resource method that declares required @RequestParam entries (via the Spring param handler) without sending any query parameters on the request.
Common situations: Clients omitting query strings (e.g. a bookmarked URL without params); API consumers hitting the endpoint directly; missing client-side query building.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Usage of multiple methods using '@RequestMapping' is not all
- Unsupported HTTP method '<method>' for @RequestMapping. Offe
- Parameter: ${i} of the constructor of class '${resourceDotNa
- Parameter: ${i} of the constructor of class '${resourceDotNa
- Unsupported type '${jaxRSAnnotationOfParam.name()}' used as
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/9dae2ad67f0ebff9.
Report an issue: GitHub.