core/play/src/main/java/play/http/DefaultHttpErrorHandler.java
protected CompletionStage<Result> onProdServerError(
      RequestHeader request, UsefulException exception) {
    return CompletableFuture.completedFuture(
        Results.internalServerError(
            views.html.defaultpages.error.render(exception, request.asScala())));
  }
protected CompletionStage<Result> onProdServerError(
      RequestHeader request, UsefulException exception) {
    return CompletableFuture.completedFuture(
        Results.internalServerError(
            views.html.defaultpages.error.render(exception, request.asScala())));
  }
Invoked in prod mode when a server error occurs.

<p>The base implementation returns {@code Results.internalServerError} with the content of
{@code views.html.defaultpages.error} template.

<p>Override this rather than [[onServerError()]] if you don't want to change Play's debug
output when logging errors in dev mode.

@param request The request that triggered the error.
@param exception The exception.
@return a CompletionStage containing the Result.