When should a failed API request be retried?

AWeber’s API is built to be easy to use and reliable. To assist with that goal the API can return a variety of errors when something goes wrong. There are a variety of reasons why errors occur and the cause could be the developer or the API itself. HTTP status codes and the error message can give you a clue. In general, a 5xx status code can be retried, a 4xx status code should be checked first, and a 3xx or 2xx code does not need retried. For more details on retrying common AWeber API errors see the list below.

Status Code: 503

Message: API Unavailable

Retry this error. The API Unavailable error means that AWeber’s API was not able to complete your request. Causes could include the API being down for maintenance or a problem on our side. If you are actively working on your application, first check AWeber's Status Page to see if we are experiencing either an unexpected problem or planned maintenance period. If the status page is clear, retry the request. In a production setting, you can retry these two or three times with a wait in between. If your application continuously receives a 503 response reach out to us at api@aweber.com with the details of your request and we’d be happy to take a look.

Status Code: 403

Message: Rate Limit Error

Retry this request after waiting. AWeber’s API does have a rate limit, and this is the error we return when the limit is exceeded. It’s okay to retry your request after waiting a bit. See our article on rate limiting for full details.

Status Code: 403

Message: Email address cannot be accepted at this time.

These requests are not to be retried. This error is returned when an email address is blocked by our abuse mitigation, i.e. the subscriber is likely a bot.

Status Code: 401

Message: Varies

Do not retry these. A 401 status code means the authorization sent by your code was incorrect, so there’s something to be fixed before making the request again. Read the error message to determine what the problem is. Common causes are an expired access token (for OAuth 2), an invalid consumer key and secret pair (for OAuth 1), or a billing issue with the customer’s account. Refer to our Authentication documentation for details.

Status Code: 400

Message: Varies

If you’re adding a subscriber, do not retry a 400 error. Read the error message before trying again, because there’s either a problem with the request or with the email address itself. Common errors with status code 400 when adding a subscriber are “Subscriber already exists” and “Email address is invalid”, along with standard request formatting errors. If you can’t figure out what’s going on check our add subscriber documentation or send us an email at api@aweber.com with the details.

Getting a different error? If you’re not sure if retrying is appropriate in your situation or if you’re not sure what an error means don’t hesitate to email us at api@aweber.com and we’ll be happy to assist.

Have more questions? Submit a request