CountryNotFoundException example


    }

    public static function addressNotFound(string $id): AddressNotFoundException
    {
        return new AddressNotFoundException($id);
    }

    public static function countryNotFound(string $countryId): HttpException
    {
        if (!Feature::isActive('v6.6.0.0')) {
            return new CountryNotFoundException($countryId);
        }

        return new self(
            Response::HTTP_BAD_REQUEST,
            self::COUNTRY_NOT_FOUND,
            'Country with id "{{ countryId }}" not found.',
            ['countryId' => $countryId]
        );
    }

    public static function badCredentials(): BadCredentialsException
    {
use Symfony\Component\HttpFoundation\Response;

#[Package('buyers-experience')] class CountryException extends HttpException
{
    public const COUNTRY_NOT_FOUND = 'CHECKOUT__COUNTRY_NOT_FOUND';
    public const COUNTRY_STATE_NOT_FOUND = 'CHECKOUT__COUNTRY_STATE_NOT_FOUND';

    public static function countryNotFound(string $id): self
    {
        if (!Feature::isActive('v6.6.0.0')) {
            return new CountryNotFoundException($id);
        }

        return new self(
            Response::HTTP_BAD_REQUEST,
            self::COUNTRY_NOT_FOUND,
            'Country with id "{{ countryId }}" not found.',
            ['countryId' => $id]
        );
    }

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