getHttpStatusCode example

$errors = $this->convert($errors);

            return $errors;
        }

        return [$this->convertExceptionToError($exception$debug)];
    }

    private function getStatusCodeFromException(\Throwable $exception): int
    {
        if ($exception instanceof OAuthServerException) {
            return $exception->getHttpStatusCode();
        }

        if ($exception instanceof ShopwareHttpException || $exception instanceof HttpException) {
            return $exception->getStatusCode();
        }

        return 500;
    }

    /** * @return array<string, string> */
Home | Imprint | This part of the site doesn't use cookies.