Skip to content
KernelFlowDevelopers v1
Errors & retries
Swap & Bridge/Integration guides
KERNELFLOW / DEVELOPERS

Errors & retries

Separate transport failures, business results, and uncertain transaction outcomes.

Response envelope

Success
{"code":0,"msg":"success","data":{}}
Business failure · HTTP 200
{"code":3000,"msg":"no route available","data":null}

Always inspect both the HTTP status and code. HTTP 200 with code 0 is success; HTTP 200 with a nonzero code is a business result. On failures, data is null and msg contains a short English reason. Retry decisions are based on HTTP status, with the documented EVM hash-only registration exception for code 2003.

Bounded quote retries

  1. Retry quotes only on HTTP 429 or 503. Do not automatically retry other statuses or HTTP 200 business failures.
  2. Honor Retry-After when present. Otherwise apply jittered backoff, for example 0.5–1.5 seconds.
  3. Allow at most two retries and cap total elapsed time, for example 15 seconds including the first attempt. If Retry-After exceeds the remaining budget, stop and ask the user to try later.

Error reference

CodeHTTPMeaningAction
1000404Unknown pathCorrect the endpoint.
1001413Body too largeKeep request bodies within 1 MiB.
1002500Internal errorAlert; do not automatically retry.
1003401UnauthorizedCheck the API key.
1004429Rate limitedHonor Retry-After.
1005403ForbiddenCheck the source IP allowlist.
2001200Invalid or missing parameterFix the parameter named by msg.
2002200Unsupported or disabled chainCheck chain and operation support.
2003200Transaction not foundFor EVM hash-only registration, retry the same hash after a few seconds.
2004200Unsupported transactionUse the returned ApproveManager transaction on contract chains.
2005200Broadcast definitely rejectedNothing was stored. Request a new quote.
2006200Order not foundCheck the order ID.
2007200Insufficient balanceCheck token balance and native gas balance.
2008200Insufficient allowanceApprove the quoted spender and wait for confirmation.
2009200Simulation revertedInspect msg for the known revert reason.
2010200Signed gas limit too lowUse the quoted gas limit or estimate when absent.
3000200No route availableDo not automatically retry the same quote.
3001503Quote timed outRetry quotes with bounded backoff.
3002503Provider unavailable, contract read failed, or contract pausedRetry quotes with bounded backoff.
3003503Chain node unavailableRetry quotes with bounded backoff.
3004429Providers rate limitedHonor Retry-After.
3005500Service misconfiguredAlert; do not automatically retry.

Operational handling

Alert on WaitVerify, any 500, and sustained 429/503 responses. Save the response X-Request-ID for support. Maintain your own order record with the aggregator orderId and source transaction hash.