Swell API libraries return a validation error object in case of an invalid PUT, POST, or DELETE request, and throw in any other error case.

Failed requests return a standard HTTP status code along with a message describing what went wrong.

StatusMeaning
400The request was malformed, or exceeded a documented limit.
402The store's plan or trial has expired and must be renewed to continue using the API.
403The credentials used aren't authorized for that resource.
404No resource exists at that path.
405The endpoint doesn't support that HTTP method.
429The request was rate limited.

A 429 means the request waited too long for capacity rather than that it was rejected outright — see rate limits for how requests are weighted and how to back off.

Two endpoints report errors differently from the rest. Transactions return typed error codes such as transaction_conflict and transaction_timeout, and roll back completely when any operation fails. In a batch, a failed operation returns an $error in its own slot of the response while the other operations still apply, so each entry has to be checked individually.