<?php
namespace Docuform\Api\Exception;

use Nyholm\Psr7\ServerRequest;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Exception\HttpInternalServerErrorException;
use Throwable;

class ApiHttpMissingKeyException extends HttpInternalServerErrorException
{
  protected $message = 'Missing key file.';
  protected string $title = '500 Missing key file';
  public function __construct(?ServerRequestInterface $request = null, ?string $message = null, ?string $description = null, ?Throwable $previous = null)
  {
    if ($description != null)
      $this->description = $description;

    parent::__construct($request ? $request : new ServerRequest("",""), $message, $previous);
  }
}
