/api/v1/errorsReport errors
The endpoint the SDKs report errors through, open to any backend that has the SDK app key.
With a Fictura SDK installed you don't call this yourself: error tracking captures for you. This page is for a backend in a language with no SDK.
Authorization
x-api-key carries your SDK app key. Send x-device-id too if the error came from one device: it counts the batch against that device's rate limit.
Body
Each needs exc_type (string). Optional: message, stack, route, method, status_code, user_id (your id for the user), release, environment, level (fatal | error | warning | info | debug), ts (when it happened), event_id (a UUID, which deduplicates retries), breadcrumbs, tags, fingerprint. Over-long strings are cut, not refused: stack is accepted up to 64,000 characters and stored truncated to 32,000. A field it does not know never fails the event.
Your clock when the batch was sent. It corrects clock drift.
curl -X POST https://api.fictura.co/api/v1/errors \
-H "x-api-key: gk_..." \
-H "Content-Type: application/json" \
-d '{"events":[{"exc_type":"TimeoutError","message":"vendor timed out","route":"/generate","user_id":"8f14e45f"}]}'Response
Events are judged one at a time, so a 200 can carry refusals.
{
"ok": true,
"results": [
{ "index": 0, "status": "stored" },
{ "index": 1, "status": "invalid", "reason": "Required" }
],
"accepted": 1,
"stored": 1,
"duplicates": 0,
"discarded": {},
"new_groups": 1,
"regressions": 0,
"invalid": 1
}status | Meaning |
|---|---|
stored | Written, and grouped into an issue. |
duplicate | Its event_id repeated inside the batch or was already stored. |
filtered | An inbound filter matched it. Counted, not stored. |
discarded | Its issue is set to discard. Counted, not stored. |
capped | Its issue is over 20 stored events this minute. Counted, not stored. |
invalid | It failed validation; reason says why. |
discarded totals the events counted but not stored, by reason. A malformed batch or one over 20 events answers a bare 400 invalid_body; a batch where every event is invalid answers 400 invalid_body with results. Over a rate limit, the whole batch answers 429 rate_limited.