Skip to content
Fous Docs
MarkdownStudio

Errors

The error object every failure returns, and the error codes each HTTP status carries.

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.codestringrequired

    Stable code to branch on. The table below lists every code by status.

  • error.messagestringrequired

    What happened, in one or two plain sentences.

  • error.next_stepstring

    What to do now, in one sentence.

  • error.doc_urlstring

    This code’s entry in the errors guide (a policy refusal: the policy).

  • error.request_idstring

    The X-Request-Id of this request: quote it to support.

  • error.reasonstring

    A 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.retryableboolean

    On a failed run: whether trying again can help (a block, a slow or failing site).

  • error.may_have_runboolean

    A method with side effects failed after its request reached the site: check the site before running it again.

  • error.retry_afterinteger

    Seconds 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.paramstring

    The parameter at fault: input.<name> for an input, method for a method.

  • error.errorsarray of object

    invalid_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 attributes
    • fieldstringrequired
    • problemstringrequired

      unknownmissingtypeenumrangeinvalid

    • messagestringrequired
    • did_you_meanstring

      unknown: the input it most likely meant.

    • expectedstring

      type: the type it takes.

    • allowedarray of JSON value

      enum: the values it takes.

  • error.methodstring

    invalid_input: the method whose inputs these are.

  • error.input_schemaobject

    invalid_input: the method’s own input_schema, exactly as stored.

  • error.exampleJSON value

    invalid_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_meanstring

    not_found: the method slug it most likely meant.

  • error.suggestionsarray of object

    not_found: methods close to the name ({id, slug, name, summary}).

  • error.alternativesarray of object

    method_repairing: methods that do the same.

  • error.versioninteger

    method_repairing: the version under repair.

  • error.latest_versioninteger

    method_repairing: the method’s newest version; not_found for a version: the newest one there is.

  • error.repairobject

    method_repairing: when the version is expected back.

    Show child attributes
    • expected_atstring
    • back_in_minutesinteger
  • error.connectobject

    connection_required: the platform and connection type to connect, and connection_id when your organization already has a connection for the site.

    Show child attributes
    • platformstring
    • typestring

      sessionapi_key

    • connection_idstring
    • statusstring

      The status of your connection, when you have one.

      pendingactiveneeds_attention

  • error.connect_urlstring

    connection_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.attestationobject

    invalid_request without attest: true: the notice the person confirms before an account is connected or signed in.

  • error.billing_urlstring

    insufficient_credits: where to add credits.

  • error.available_creditsnumber

    insufficient_credits: the credits the organization has.

  • error.required_creditsinteger

    insufficient_credits: what the run, query or build costs.

  • error.privateboolean

    insufficient_credits on a build: a private method, which always costs credits.

  • error.free_buildsobject

    insufficient_credits on a build: the month’s free builds.

    Show child attributes
    • usedinteger
    • allowanceinteger
    • resets_atstring
  • error.spend_limitobject

    insufficient_credits with reason spend_limit: the monthly limit, what was spent, in credits, and when it resets.

    Show child attributes
    • limitnumber
    • spentnumber
    • resets_atstring
  • error.limitobject

    rate_limited: the plan limit met, and its value when the plan sets one.

    Show child attributes
    • kindstring

      requests_per_minuteconcurrent_runssearches_per_minute

    • valueinteger
  • error.run_idstring

    The failed run (failures are free).

  • error.stepsarray of object

    A failed query: the method calls it made and how each ended.