Error Handling

Keito API v2 returns Harvest-compatible error bodies:

{
  "error": "bad request",
  "error_description": "Missing Keito-Account-Id header"
}

HTTP Status Codes

CodeMeaningCommon Cause
400Bad RequestMissing Keito-Account-Id, missing required field, invalid value
401UnauthorizedMissing or invalid API key
403ForbiddenUser lacks permission for the company or resource
404Not FoundResource does not exist or is outside the company
409ConflictConflict such as deleting an approved time entry
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer-side error

Retry Strategy

Do not retry validation or authorization errors. For 429 responses, wait before retrying. For 5xx responses, use exponential backoff starting at 1 second.

The Keito CLI retries transient network and server errors automatically. Client errors are returned immediately with a deterministic exit code.