LanguageNotFoundException example

$previous->getMessage(),
            $previous->getParameters(),
        );
    }

    /** * @deprecated tag:v6.6.0 - reason:return-type-change - will return `self` in the future */
    public static function invalidLanguageId(?string $languageId): HttpException
    {
        if (!Feature::isActive('v6.6.0.0')) {
            return new LanguageNotFoundException($languageId);
        }

        return new self(
            Response::HTTP_BAD_REQUEST,
            self::INVALID_LANGUAGE_ID,
            'The provided language id "{{ languageId }}" is invalid.',
            ['languageId' => $languageId]
        );
    }

    /** * @deprecated tag:v6.6.0 - reason:return-type-change - will return `self` in the future */
'The locale {{ locale }} does not exists.',
            ['locale' => $locale]
        );
    }

    /** * @deprecated tag:v6.6.0 - reason:return-type-change - will return `self` in the future */
    public static function languageNotFound(?string $languageId): HttpException
    {
        if (!Feature::isActive('v6.6.0.0')) {
            return new LanguageNotFoundException($languageId);
        }

        return new self(
            Response::HTTP_PRECONDITION_FAILED,
            self::LANGUAGE_NOT_FOUND,
            'The language "{{ languageId }}" was not found.',
            ['languageId' => $languageId]
        );
    }
}
return new self(
            Response::HTTP_BAD_REQUEST,
            self::MISSING_REQUEST_PARAMETER_CODE,
            'Parameter "{{ parameterName }}" is missing.',
            ['parameterName' => $name, 'path' => $path]
        );
    }

    public static function languageNotFound(?string $languageId): self
    {
        if (!Feature::isActive('v6.6.0.0')) {
            return new LanguageNotFoundException($languageId);
        }

        return new self(
            Response::HTTP_PRECONDITION_FAILED,
            self::LANGUAGE_NOT_FOUND,
            'The language "{{ languageId }}" was not found.',
            ['languageId' => $languageId]
        );
    }

    public static function appIntegrationNotFound(string $integrationId): self
    {
Home | Imprint | This part of the site doesn't use cookies.