protected function defaultExceptionResolver(): Closure
    {
        return function (string $errorMessage) {
            return (new GenericException($errorMessage))
                ->setExtensions([$this->errorType => $this->errors])
                ->setCategory($this->errorType);
        };
    }