Sidelatch Docs
Docs menu

View as Markdown

Errors

Every error from the API has the same shape. Branch on error, the code; show or log message, which may change. request_id is also in the Sidelatch-Request-Id header. A failed run adds its run_id.

Error body{
  "error": "reconnect_needed",
  "message": "The portal no longer accepts the stored login...",
  "reason": "wrong_password",
  "run_id": "run_5d1e...",
  "request_id": "req_9b2f..."
}

Each code has an owner, which says whose move it is: you (change the request), the user (they have to sign in again or answer a step), the portal (down, slow or changed), or Sidelatch (ours; retry and send us the request id).

CodeStatusWhose moveWhat it means
invalid_api_key401YouThe API key is missing, wrong or revoked.
read_only_key403YouThis API key can only read. Use a read_write key.
invalid_request422YouThe request body or a parameter is not valid. detail lists each problem.
bad_params400YouThe operation's params are not valid. message says which.
unknown_operation404YouThis portal has no operation by that name. See GET /v1/portals.
unknown_portal404YouNo portal by that name. See GET /v1/portals.
portal_not_enabled403YouThis portal is not turned on for your account.
not_found404YouNo such resource, or it belongs to another account.
not_an_upload400YouThis operation does not take a file. Use /run.
file_too_large413YouThe file is over the upload limit (max_bytes).
idempotency_key_reused422YouThis Idempotency-Key was already used for a different request.
idempotency_in_progress409YouA write with this Idempotency-Key is still running, or its outcome is unknown. Read the portal (or the run) before trying again with a new key.
connection_read_only403YouThe user linked this connection read-only, so it takes no writes. Relink it with a link token that has "writes": true to ask the user for more.
not_enabled400YouThis feature is not turned on for this server or account.
plan_limit403YouYour plan doesn't include this. message says which limit; upgrade is where to upgrade.
rate_limited429YouToo many calls. Wait retry_after seconds. scope says which limit.
conflict409YouThe request conflicts with the current state. message says how.
bad_request400YouThe request could not be used. message says why.
forbidden403YouThis account or key may not do that.
portal_in_use409YouConnections still use the portal this build made. Delete those connections first, then delete the build.
run_not_finished409YouThe run is still queued or running. Poll again.
reconnect_needed409The userThe portal no longer accepts the stored login. Ask the user to sign in again through the connect window; the connection id stays the same. reason says why when it is known.
auth_failed401The userThe portal rejected the username, password or code the user entered.
challenge_failed401The userThe answer to a sign-in challenge was wrong or ran out of tries.
link_expired400The userThe link token or sign-in step expired or was already used. Start again with a new link token.
locked_out429The userToo many failed sign-ins. We stop before the portal locks the account. Try again later.
login_blocked422The userThe portal wants a check that only a person on its own page can pass.
session_refused400The portalThe user signed in, but the portal refused Sidelatch's reads with that session (often a bot check on the portal's side). Nothing was saved.
portal_down503The portalThe portal is not responding. Retry later.
portal_busy503The portalThe portal asked us to slow down, or its request budget is spent. Wait retry_after seconds.
schema_drift502The portalThe portal changed what it returns. We are alerted and repair the connector.
browser_busy503SidelatchEvery hosted sign-in browser is in use. Try again in a minute.
unavailable503SidelatchPart of the service is not available right now. Retry later.
timeout504SidelatchThe call did not finish in time. Nothing is retried for you; run it again, or use an async run.
internal_error500SidelatchSomething went wrong on our side. Retry later and send us the request id.

Why a connection needs the user

reconnect_needed, the connection.reconnect_needed event and GET /v1/connections all carry a reason.

ReasonMeaning
wrong_passwordA full sign-in with the stored login was refused. The user changed their password, or the account is locked.
session_rejectedThe portal stopped accepting the saved session and there was no way to renew it.
challenge_requiredSigning in again needs a step only the user can answer (a texted code, a phone approval, a CAPTCHA).
portal_blockedThe portal put up a check that only a person on its own page can pass.

More on common codes

StatusErrorWhat to do
409reconnect_neededThe user's password changed or the portal refused the login. Create a link token for the same user and portal and open the connect window again. The connection id stays the same.
503portal_downThe portal is down or timing out. Retry later.
503portal_busyWe are holding back from this portal for a moment: it asked us to slow down, or its request budget is spent. Nothing was sent. Retry after retry_after seconds (also in the Retry-After header). The connection is fine.
429rate_limitedYou are calling the portal faster than your fair share allows. Nothing was sent. scope says which limit: customer_portal (your account may use half of each portal's request budget, so one customer can't slow the portal for everyone) or connection_daily (each connection makes up to 1,000 portal calls a day, refilling steadily). Retry after retry_after seconds, or pass max_age to read a recent result: cached reads never count. GET /v1/usage shows your limits.
502schema_driftThe portal changed what it returns. We are alerted and fix the connector.
400bad_paramsYour params don't fit the operation. detail says why.
403read_only_keyThe operation writes to the portal and your key is read-only. Use a read_write key.
422idempotency_key_reusedYou sent this Idempotency-Key with a different request. Use a new key for each write.
404unknown_operationThe portal has no such operation.
404not_foundNo such record, or no such connection on your account.
401Missing or unknown API key.