Logstreem
Errors

Errors

One error envelope for every failure, with a stable machine-readable code.

Logstreem uses conventional HTTP status codes. Every failure returns the same envelope.

Error envelope
{
  "error": {
    "type": "query_error",
    "code": "query_unknown_field",
    "message": "Line 2: no field named 'statuss' in dataset 'api-gateway-prod'.",
    "param": "apl",
    "doc_url": "https://logstreem.com/docs/errors#query_unknown_field",
    "request_id": "req_9f3c2a7b41de08c5b2e6d1a4"
  }
}

Status codes

StatusMeaningRetry?
200 / 201Success
400Malformed body, or a query that will not parseNo — fix the request
401Missing, malformed or revoked tokenNo
403Token is valid but not scoped to this datasetNo
404No such dataset, monitor or endpointNo
409Conflicts with current state, e.g. a dataset name in useNo
413Ingest payload over the size capNo — batch smaller
429Rate limited. See Rate limitsYes, with backoff
5xxSomething broke on our sideYes, with backoff

Error codes

CodeStatusWhat happened
missing_token401No Authorization header was sent
invalid_token401The token is malformed or has been revoked
token_scope_denied403The token is not scoped to that dataset or action
resource_not_found404The path or id does not resolve
dataset_not_found404No dataset with that name on this org
payload_too_large413Over 10 MB compressed in one ingest request
invalid_json400The body is not valid JSON or NDJSON
field_limit_exceeded400The dataset is at its 4,096-field cap
query_syntax_error400LSQL would not parse — the message carries the line
query_unknown_field400A field referenced by the query does not exist
query_unsupported_operator400The operator is not available in this context
query_timeout400The query exceeded its cost limit
rate_limit_exceeded429Too many requests in the window

Log the request id

request_id is also the X-Request-Id header on successful calls. Logging it on both paths makes a support request solvable in one round trip.