core/play/src/main/java/play/http/DefaultHttpErrorHandler.java
protected CompletionStage<Result> onDevServerError(
      RequestHeader request, UsefulException exception) {
    return CompletableFuture.completedFuture(
        Results.internalServerError(
            views.html.defaultpages.devError.render(playEditor, exception, request.asScala())));
  }
protected CompletionStage<Result> onDevServerError(
      RequestHeader request, UsefulException exception) {
    return CompletableFuture.completedFuture(
        Results.internalServerError(
            views.html.defaultpages.devError.render(playEditor, exception, request.asScala())));
  }
Invoked in dev mode when a server error occurs. Note that this method is where the URL set by
play.editor is used.

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

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