Errors

Each error has an HTTP status and a stable code. Branch on the code; show the message.

{
  "error": {
    "code": "forbidden",
    "message": "API key ci needs the role owner on acme for credit-add. See shako access ls, https://shako.dev/docs/access-control.md"
  }
}

Fields

error.codestring
A stable code for programs. Branch on it.
error.messagestring
The text for people. Do not parse it.

Codes

HTTPCodeWhen
400invalidA field, a value or the body is not correct. The message names the field.
401unauthorizedNo key, a removed key, or an expired key.
402no_creditThe credit of the tenant is used up. Its VMs sleep until a top-up.
403forbiddenThe role of the key is too low for the endpoint.
403quotaA limit: the VMs or the secrets of a tenant, or the tenants of an account.
404not_foundNo such endpoint, VM, secret or device, or no such tenant for the key.
409conflictThe state of the VM does not allow the call, or another call holds the VM. Try again later.
409no_tenantThe account has no tenant yet.
429rate_limitedToo many calls. Wait, then try again.
500internalAn error in Shako.
502not_listeningThe VM is awake, but no program accepts connections on the port.
503unreachableA part of Shako does not answer. Try again.
507box_fullThe host has no memory or disk left.