public function html(WebException $exception) {
    $message = $exception->getMessage();
    $statusCode = $exception->getStatusCode();
    $details = $exception->getDetails() === null ? "" : $exception->getDetails();
    return "
      <!DOCTYPE html>
      <html>
        <head><title>$message</title></head>
        <body>
          <h1>HTTP $statusCode: $message</h1>
          <p>$details</p>
        </body>
      </html>
    ";
  }