Error rate limit HTTP API

Hi everyone :-), so I’m sending a request from google sheets to an API using HTTP Make a request . My scenario gets stuck when it gets to the HTTP API module with this message

‘The request rate limit may have been exceeded.’

However, when I press ‘run this module only’ it works fine… I’m not quite sure what I’m doing wrong? Grateful for any help!

blueprint (6).json (54.0 KB)

Input bundle

[
    {
        "ca": null,
        "qs": [
            {
                "name": "CPV",
                "value": "CPV code for Facilities management: security, cleaning, catering and business-related services (79900000):\n79998000 - Cleaning and sanitation"
            },
            {
                "name": "limit",
                "value": "1"
            },
            {
                "name": "Location",
                "value": "England"
            }
        ],
        "url": "https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages",
        "data": null,
        "gzip": true,
        "method": "get",
        "headers": [],
        "timeout": null,
        "useMtls": false,
        "authPass": null,
        "authUser": null,
        "bodyType": "raw",
        "contentType": null,
        "serializeUrl": false,
        "shareCookies": false,
        "parseResponse": false,
        "followRedirect": true,
        "useQuerystring": false,
        "followAllRedirects": false,
        "rejectUnauthorized": true
    }
]

Output bundle

[
    null
]

Hi @Bola

A rate limit error halts your requests from the side of the external service. It means that you have done too many requests in a short period of time. This rate limit depends on the service, I don’t know what it is exactly for the service you are using. It is a self-resolving error, after an X amount of time passed, you can send new requests.

When you run the module manually, the amount of request you can execute has probably fallen within limits again, thus no error occurs.

If you have a lot of bundles in your scenario, and you start firing them all via the HTTP module at once, you will likely run into the rate limit. A solution is to add a sleep module with one or several seconds of delay before the HTTP module.

Cheers,
Henk

4 Likes

Thanks for this. I deleted the scenario and started it again and it worked! Perhaps the order modules are added affects things.

Thanks so much for getting back to me :grinning:

1 Like

Deleted the scenario? Oh no, you should not have done that! :grin:

If a module receives a Rate Limit / Too Many Requests error, it really is related to how many requests are sent in a particular amount of time. Waiting for a bit and making sure that the amount of requests you send are throttled will solve it.

Another approach is to use the ‘break’ error handler. This will place bundles in the incomplete executions list and will retry them later: https://www.make.com/en/help/errors/error-handlers/break-error-handler

Happy to hear it worked out anyway!

Cheers,
Henk