Auth And Errors
Production auth and rate limiting are still pending in this repo. The response envelope and error behavior shown below reflect worker runtime today.
Current error responses use JSON with:
success(boolean)error(string)- optional
code(machine-readable) - optional
details - optional
fieldfor validation issues - optional
statusfor async tasks
Common Status Codes
| Code | Meaning |
|---|---|
400 | Invalid body, path parameter, or URL |
404 | Job or resource not found |
409 | Feedback submitted for failed search |
500 | Unexpected runtime failure |
503 | Provider or dependency temporary failure |
Error sample: invalid URL
{
"success": false,
"code": "BAD_REQUEST",
"error": "url must be a valid http(s) url",
"details": { "field": "url" }
}
Error sample: missing job
{
"success": false,
"code": "RESOURCE_NOT_FOUND",
"error": "Job does not exist",
"details": { "id": "crawl-unknown" }
}
Error-handling expectations
- Inputs are validated before queueing work.
- Async handlers can return
queued,running,completed, orfailed. - For
failed, clients should retry with freshPOSTfor idempotent operations if safe.
Auth and rate limiting status
Current status:
- No API-key enforcement yet.
- No strict request quotas yet.
- If you need temporary access gating, add it at your edge or gateway layer before exposing public endpoints.
Recommended production controls
- Add token auth at ingress (API keys or OAuth2 introspection).
- Add per-key and per-IP rate limits.
- Track request id + idempotency headers in analytics/logging.
- Keep
/openapi.jsonbehind internal network if you want contract secrecy.