core/play/src/main/java/play/http/DefaultHttpErrorHandler.java
protected CompletionStage<Result> onBadRequest(RequestHeader request, String message) {
    return CompletableFuture.completedFuture(
        Results.badRequest(
            views.html.defaultpages.badRequest.render(
                request.method(), request.uri(), message, request.asScala())));
  }
protected CompletionStage<Result> onBadRequest(RequestHeader request, String message) {
    return CompletableFuture.completedFuture(
        Results.badRequest(
            views.html.defaultpages.badRequest.render(
                request.method(), request.uri(), message, request.asScala())));
  }
Invoked when a client makes a bad request.

<p>Returns Results.badRequest (400) with the included template from {@code
views.html.defaultpages.badRequest} as the content.

@param request The request that was bad.
@param message The error message.
@return a CompletionStage containing the Result.