Latch Errors

All errors return JSON with error and code fields. Validation errors include a fields object with per-field messages.

{
  "error": "Human readable message",
  "code": "service.error_name",
  "fields": { "field_name": ["Validation error message"] }
}

Error Reference

CodeHTTPCauseFix
validation_error400Invalid key format, TTL, or timeout valueCheck allowed key characters (alphanumeric, dash, underscore, colon). TTL and timeout max is 900,000ms.
unauthorized401Missing or invalid API keyAdd a valid Authorization: Bearer sm_... header. See Authentication.
insufficient_balance402Account out of API creditsUpgrade your plan. See Pricing.
forbidden403Token does not match the current lock holderVerify you are using the token returned from your acquire call. The lock may have already been released or auto-released.
not_found404Lock does not exist for this keyThe lock was never acquired, already released, or expired. Use GET /v1/latch/:key to check status.
request_timeout408Lock not acquired within the specified timeoutIncrease timeout, or check if the lock holder is releasing promptly. Safe to retry.
rate_limit_exceeded429Account rate limit hit or 100+ waiters already queuedBack off and retry. Queue-depth 429s are separate from account-level rate limits. See Rate Limits.