Skip to content

Error codes

Every HTTP status and code the ingest service returns, and what to do about each.

An error response over HTTP is a JSON body of the shape { error, code, details? }. error is a short message for a human. code is stable and safe to match on in your own code. details carries extra fields for some codes, for example retryAfter on a 429.

Ingest error codes
CodeStatusDescription
VALIDATION_ERROR400The body failed validation: a wrong type, a key over the limit, a bad timestamp, or a timestamp more than one hour from now.
UNAUTHORIZED401The Authorization header is missing, or the token does not match the device or stream in the path.
INGESTION_BLOCKED403The organization that owns the device or stream has ingestion switched off.
NOT_FOUND404No route matches the path.
PAYLOAD_TOO_LARGE413The declared Content-Length is above the request body cap.
RATE_LIMIT_EXCEEDED429The device, stream or client IP sent more requests than its window allows. Wait retryAfter seconds.
INTERNAL_ERROR500Something failed inside Logable. The body carries no detail. Retry with backoff.

Over MQTT#

There is no reply channel. A rejected message is dropped. The device log shows the reason.

Device log codes#

The device log on a device's Connection tab, and on the same device in the mobile app, shows what Logable did with each message and why. Each row carries one of these codes. Rejections and denials also leave a one-line notice on the device overview until the device sends an accepted message.

Device log codes
CodeKindDescription
invalid_topicrejectedPublished to an unknown topic. Publish device data to devices/{deviceId}/data.
parse_failedrejectedThe payload is not valid JSON, or has no data object. Send a JSON object with a data object of metric values.
validation_failedrejectedThe payload failed validation. Check the metric names and value types for this device type.
payload_too_largerejectedThe payload is larger than 1 MB. Send fewer metrics per message.
rate_limitedrejectedThe device sent more than 10 messages per second. Send at most 10 messages per second from one device.
org_rate_limitedrejectedThe organisation sent more than 200 messages per second. Reduce the total send rate across all devices.
ingestion_blockedrejectedIngestion is switched off for this organisation. Contact the organisation owner.
internal_errorrejectedThe message could not be processed. Try again. If it repeats, contact support.
token_rejectedauth_deniedAuthentication failed. The token does not match this device. Use the device id as the username and a current device token as the password.
client_id_reservedauth_deniedAuthentication failed. The client id belongs to another device. Use your own client id, or logable-{deviceId}.
missing_credentialsauth_deniedAuthentication failed. No username or password was sent. Use the device id as the username and a current device token as the password.
topic_not_allowedpublish_deniedPublish denied. The topic is outside this device's namespace. Publish to devices/{deviceId}/data.
client_connectedconnectedConnected.
client_disconnecteddisconnectedDisconnected: the broker's reason (for example keepalive timeout).

The kind column says what the row is about. rejected is a message Logable refused. auth_denied is a connection or request Logable refused. publish_denied is a topic outside the device namespace. connected and disconnected are what the MQTT broker saw.

Examples#

A validation error:

{
  "error": "Invalid data payload",
  "code": "VALIDATION_ERROR",
  "details": {
    "message": "exceeds max length"
  }
}

A rate limit:

{
  "error": "Too many requests",
  "code": "RATE_LIMIT_EXCEEDED",
  "details": {
    "message": "Rate limit: 10 requests per 1000ms per device",
    "retryAfter": 1
  }
}

Search the docs

Find a guide, an integration page, or a device type.