protected function getErrorType(\Exception $exception)
    {
        $errorType = get_class($exception);

        $pos = strrpos($errorType, '\\');
        if ($pos !== false) {
            $errorType = substr($errorType, $pos);
        }

        $errorType = Str::replaceLast($errorType, 'Exception', '');

        if (!$errorType) {
            $errorType = 'Unknown';
        }

        return $errorType;
    }