Handling failed requests

When making requests to Ecwid API, you may run into errors like 400, 500 and so on. This can happen to your batch requests too. So it's important to know how Ecwid handles them and how you can control this.

Stopping on first failure

You can use stopOnFirstFailure parameter when creating your batch request.

It allows you to ignore failed requests and continue with the batch requests – false OR stop execution when a failed request is detected – true. By default, Ecwid will stop execution of your batch requests. So the default value is true.

Continuing with failed requests

Ecwid has two modes for working with failed requests when stopOnFirstFailure is false:

  1. If error code is 4XX, Ecwid will move on to the next request

  2. If error code is 5XX or request has timed out, Ecwid will retry 5 times with a 3 second interval