A failure answers an HTTP error status with the object below. Branch on error.code; the errors guide says what each code means and what to do about it.
The Error object
Every field sits under error.
error.codestringrequiredStable code to branch on. The table below lists every code by status.
error.messagestringrequiredWhat happened, in one or two plain sentences.
error.next_stepstringWhat to do now, in one sentence.
error.doc_urlstringThis code’s entry in the errors guide (a policy refusal: the policy).
error.request_idstringThe X-Request-Id of this request: quote it to support.
error.reasonstringA finer cause when one helps: site_rate_limited, spend_limit, not_owned, stopped, body_too_large, sign_in_busy, step_expired, or (request_refused) the request check’s verdict: unclear, unsupported, explicit, harmful, platform_probe, refused.
error.retryablebooleanOn a failed run: whether trying again can help (a block, a slow or failing site).
error.may_have_runbooleanA method with side effects failed after its request reached the site: check the site before running it again.
error.retry_afterintegerSeconds to wait before trying again: the plan’s (rate_limited, with Retry-After), Fous’s (service_unavailable) or the site’s, when it said.
error.paramstringThe parameter at fault: input.<name> for an input, method for a method.
error.errorsarray of objectinvalid_input: every input that does not fit, all at once. A required input that a misspelled name was meant for is listed as missing too; the message counts the two once.
Show child attributesHide child attributes
fieldstringrequiredproblemstringrequiredunknownmissingtypeenumrangeinvalid
messagestringrequireddid_you_meanstringunknown: the input it most likely meant.
expectedstringtype: the type it takes.
allowedarray of JSON valueenum: the values it takes.
error.methodstringinvalid_input: the method whose inputs these are.
error.input_schemaobjectinvalid_input: the method’s own input_schema, exactly as stored.
error.exampleJSON valueinvalid_input: a call that fits ({method, input}), from the method’s saved example (a write method’s is built from its schema). request_refused (unclear) and not_buildable: a request phrased so it can be built.
error.did_you_meanstringnot_found: the method slug it most likely meant.
error.suggestionsarray of objectnot_found: methods close to the name ({id, slug, name, summary}).
error.alternativesarray of objectmethod_repairing: methods that do the same.
error.versionintegermethod_repairing: the version under repair.
error.latest_versionintegermethod_repairing: the method’s newest version; not_found for a version: the newest one there is.
error.repairobjectmethod_repairing: when the version is expected back.
Show child attributesHide child attributes
expected_atstringback_in_minutesinteger
error.connectobjectconnection_required: the platform and connection type to connect, and connection_id when your organization already has a connection for the site.
Show child attributesHide child attributes
platformstringtypestringsessionapi_key
connection_idstringstatusstringThe status of your connection, when you have one.
pendingactiveneeds_attention
error.connect_urlstringconnection_required: the Fous Studio page where a person connects the account (your connection for the site, or a new one). A login also signs in with POST /v1/connections/{id}/sign-in.
error.attestationobjectinvalid_request without attest: true: the notice the person confirms before an account is connected or signed in.
error.billing_urlstringinsufficient_credits: where to add credits.
error.available_creditsnumberinsufficient_credits: the credits the organization has.
error.required_creditsintegerinsufficient_credits: what the run, query or build costs.
error.privatebooleaninsufficient_credits on a build: a private method, which always costs credits.
error.free_buildsobjectinsufficient_credits on a build: the month’s free builds.
Show child attributesHide child attributes
usedintegerallowanceintegerresets_atstring
error.spend_limitobjectinsufficient_credits with reason spend_limit: the monthly limit, what was spent, in credits, and when it resets.
Show child attributesHide child attributes
limitnumberspentnumberresets_atstring
error.limitobjectrate_limited: the plan limit met, and its value when the plan sets one.
Show child attributesHide child attributes
kindstringrequests_per_minuteconcurrent_runssearches_per_minute
valueinteger
error.run_idstringThe failed run (failures are free).
error.stepsarray of objectA failed query: the method calls it made and how each ended.