Skip to content

Empty reply from server after updating brand followed by immediately creating product #138

Description

@flyingL123

I am attempting to first update a brand, then create a product using the Bigcommerce API. I am doing so with the following code:

Bigcommerce::updateBrand(48, ['name'=>'Del Sol']);
echo "Brand Updated";
Bigcommerce::createProduct(['name'=>'New Test'.rand(), 'weight'=>3, 'price'=>3, 'availability'=>'available', 'categories'=>[1582], 'type'=>'physical']);
echo "Product Created";

This results in an Bigcommerce\Api\NetworkError being returned, with the message Empty reply from server.

If I run either of the commands above by themselves, the request succeeds. If I switch the order of the commands, so that the product is created and then the brand is updated, both requests succeed. However, when I run them as shown, the updateBrand command works correctly, but the createProduct command hangs for a while and then throws the Bigcommerce\Api\NetworkError.

Why would this be happening?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions