limits-and-retries

by Omniio

Decide whether a failed Omniio call should be retried, and how long to wait. Use when a tool call or REST request returns a rate limit, a quota message, a 4xx or a 5xx, so that retryable failures are retried correctly and permanent ones are not retried at all.

Using this gatewayAlways on1 file

What it tells an agent to do.

The author’s own instructions, as your agent receives them — the same bytes the endpoint serves.

Retry, or don't

Most failures against this gateway are permanent, and retrying them wastes the user's allowance to arrive at the same answer. A few are transient and worth one more attempt. The message tells you which.

The rule

Retry only when the failure is about timing. Never retry when it is about correctness or permission.

What came backRetry?Do this instead
400, invalid parameterNoFix the named field. Re-read the schema.
401, invalid keyNoThe credential is wrong or revoked. Say so.
404, missing resourceNoWrong slug or wrong account.
409 on a credentialed serverNoConnect or disconnect it in the app.
429, rate limitYesWait exactly the Retry-After seconds.
500YesBounded exponential backoff, a few attempts, then stop.
Policy denialNoThe account switched this off deliberately.
Approval pendingNo — waitSee handling-held-and-refused-calls.

Rate limit is not quota

Two different limits, two different answers, and confusing them sends the user to a pricing page for a problem that resolves in thirty seconds.

Rate limit is per minute. The message says so, gives a number of seconds, and states that nothing was consumed. Wait that long and call again. Do not tell the user to upgrade.

Quota is the monthly allowance. On the free plan calls are refused once it is spent, until the counter resets. That one genuinely is a plan question.

Read which one you got before advising anything.

Backoff, briefly

For a 500 or a transport failure: one retry after roughly a second, a second after roughly four, then stop and report it. Do not retry indefinitely, and do not retry a run_tool that may have already acted — a write that returns a 500 may still have happened. Check before repeating it.

Relay the message

Omniio's error text is written to be read by whoever has to fix it: it names the limit, says whether anything was consumed, and gives the exact wait. Passing it through is more useful than summarising it as "the request failed".

More in using this gateway

finding-and-calling-tools

Omniio

Find and correctly call a tool on an Omniio MCP gateway. Use whenever a request could be served by an external system — live data, a lookup, or an action in a c

What it does →

handling-held-and-refused-calls

Omniio

Respond correctly when an Omniio tool call is held for human approval, denied by policy, or refused for a spent approval. Use when run_tool returns a message ab

What it does →

connecting-a-server

Omniio

Diagnose and explain why a tool the user expected is missing from an Omniio gateway, and tell them exactly how to connect the server that provides it. Use when

What it does →