Test if the entity exception is the result of a verification exception

@param EntityException $e

@return bool
333901
public static function isTotpException(EntityException $e)
    {
        if (in_array($e->getStatusCode(), array(RestStatusCodesInterface::REST_CLIENT_ERROR_UNPROCESSABLE_ENTITY, RestStatusCodesInterface::REST_CLIENT_ERROR_LOCKED))
            && in_array($e->getJsonErrorCode(), self::getVerificationJsonStatusCodes())
        ) {
            return true;
        } else {
            return false;
        }
    }
1226011
public function isRetryableException(\Exception $e, $query = null)
    {
        if (null === $query || $this->isUpdateQuery($query)) {
            return $this->_driver->isGoneAwayInUpdateException($e);
        }

        return $this->_driver->isGoneAwayException($e);
    }
915140
protected function convertValidationExceptionToEntityException(ValidationException $e): UnprocessableEntityException
    {
        return new UnprocessableEntityException(Arr::first(Arr::first($e->errors())));
    }
98751
public function exception($e) {
        $type = "system";
        if (isset($_GET['type'])) {
            $type = $_GET['type'];
        }
        switch ($type) {
        case 'dapi':
        case 'api':
            $this->exception[] = $e;
            break;
        case 'page':
        default:
            require __DIR__ . '/exception.php';
            break;
        }
    }
432513
protected function shouldntReport(Exception $e)
    {
        $dontReport = array_merge($this->dontReport, $this->internalDontReport);

        return ! is_null(Arr::first($dontReport, function ($type) use ($e) {
            return $e instanceof $type;
        }));
    }
644778
public function validate(EntityInterface $entity)
    {
        if (!$entity instanceof Role) {
            throw new Exception(
                sprintf('The Entity to validate must be an instance of %s', Role::class)
            );
        }

        $this->validateRole($entity->getRole());
        $this->validateLabel($entity->getLabel());
        $this->validateUserCreated($entity->getUserCreated());
        $errors = $this->getErrors();

        return empty($errors);
    }
219656
public function isMicroServiceException(Exception $e)
    {
        foreach ($this->microServicesExceptionTypes as $exceptionType) {
            if ($e instanceof $exceptionType) {
                return true;
            }
        }

        return false;
    }
215871
protected function convertExceptionToResponse(Exception $e)
    {
        return SymfonyResponse::create(
            $this->renderExceptionContent($e),
            $this->isHttpException($e) ? $e->getStatusCode() : 500,
            $this->isHttpException($e) ? $e->getHeaders() : []
        );
    }
1276555
public function logErrorException(\Exception $e)
    {
        if ($this->getServerContext()->hasLogger(LoggerUtils::SYSTEM)) {
            $this->getServerContext()->getLogger(LoggerUtils::SYSTEM)->error($e->__toString());
        }
    }
741447
public function handleException( \Throwable $e ) : bool
    {
        // Render exception
        $output = $this->renderer->output( $e );
        
        // output
        $this->logger->error($output, [
            'exception' => $e,
        ]);
    
        return true;
    }
23781
protected function silenceNonErrorException(\Exception $e){
		$message = $e->getMessage();

		// @todo silence.
		$x = explode(':', $message, 2);

		if(trim($x[0]) === 'SQLSTATE[IMSSP]'){

			if(strpos(strtolower($x[1]), 'no fields') > 0){
				return true;
			}

		}

		throw new DriverException('sql error: ['.get_called_class().'::raw()]'.$message);
	}
925821
public function verify()
    {
        if (is_null($this->verified)) {
            try {
                $this->verified = (bool) $this->verifyEnvironment();
                if (!$this->verified) {
                    throw new Exception\EnvironmentException("The adapter did not properly verify.");
                }
            } catch (\Exception $e) {
                $this->verificationError = $e->getMessage();
                $this->verified = false;
            }
        }

        return $this->verified;
    }
1270299
protected function collectValidationErrors(ValidationException $e)
    {
        //json doesnt need all the depths
        $this->message = array_flatten(array_values($e->validator->errors()->getMessages()));

        $this->statusCode = 422;
    }
327085
public function report(Exception $e)
    {
        if ($this->shouldntReport($e)) {
            return;
        }

        if (is_callable($reportCallable = [$e, 'report'])) {
            return $this->container->call($reportCallable);
        }

        try {
            $logger = $this->container->make(LoggerInterface::class);
        } catch (Exception $ex) {
            throw $e;
        }

        $logger->error(
            $e->getMessage(),
            array_merge($this->context(), ['exception' => $e]
        ));
    }
397084
protected function convertExceptionToResponse(Exception $e)
    {
        $e = FlattenException::create($e);

        $handler = new SymfonyExceptionHandler(config('app.debug'));

        $decorated = $this->decorate($handler->getContent($e), $handler->getStylesheet($e));

        return SymfonyResponse::create($decorated, $e->getStatusCode(), $e->getHeaders());
    }
201639
protected function isExceptionRecoverable($e)
	{
		if ($e instanceof \ErrorException)
		{
			$ignore = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_STRICT;
			return (($ignore & $e->getSeverity()) != 0);
		}

		return false;
	}
25028
protected function returnException(Exception $e)
    {
        $key = snake_case(class_basename($e));
        $message = $this->translate($key, $e->getMessage());

        return new ExceptionReply($message, [], $e);
    }