AddressNotFoundException example

public static function pricesParameterIsMissing(): self
    {
        return new self(
            Response::HTTP_BAD_REQUEST,
            self::PRICES_PARAMETER_IS_MISSING,
            'Parameter "prices" is missing.',
        );
    }

    public static function addressNotFound(string $id): ShopwareHttpException
    {
        return new AddressNotFoundException($id);
    }
}
public static function productIdsParameterIsMissing(): ShopwareHttpException
    {
        return new self(
            Response::HTTP_BAD_REQUEST,
            self::PRODUCT_IDS_PARAMETER_IS_MISSING,
            'Parameter "productIds" is missing.',
        );
    }

    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,
            
Home | Imprint | This part of the site doesn't use cookies.