Skip to content

Error Codes

HTTP Status Codes

CodeMeaning
200Success
201Created (POST share)
204No Content (DELETE)
400Request validation error
401Unauthorized
403Forbidden
404Resource not found
422Invalid request body format
429Rate limit exceeded
500Internal server error

Business Errors (in SSE FAILURE)

These occur inside the state: "FAILURE" event from the status stream.

json
{
  "state": "FAILURE",
  "error": {
    "code": 1001,
    "message": "Failed to parse page: connection timeout"
  }
}
CodeNameDescription
1001PARSER_FAILUREA page URL could not be fetched or parsed
1002ANALYSIS_SERVICE_FAILUREInternal analysis service error
1003CRITICAL_OWN_PAGE_FAILUREYour own page returned an error or is unreachable
1004REPORT_GENERATION_FAILUREFailed to compile the analysis report
1005TRIPLET_ANALYSIS_FAILUREKnowledge Graph extraction failed
9999UNKNOWN_ERRORUnexpected error

Handling Errors — Python

python
with requests.get(stream_url, headers=HEADERS, stream=True) as resp:
    for line in resp.iter_lines():
        if not line or not line.startswith(b"data: "):
            continue
        event = json.loads(line[6:])
        if event["state"] == "FAILURE":
            err = event.get("error", {})
            raise RuntimeError(f"[{err.get('code')}] {err.get('message')}")

Validation Errors (422)

json
{
  "detail": [
    {
      "loc": ["body", "competitor_urls"],
      "msg": "ensure this value has at most 20 items",
      "type": "value_error.list.max_items"
    }
  ]
}