K-Block reports every problem with a stable, machine-readable code next to a human-readable message. Program against the code, never the message: messages may be reworded, codes do not change meaning.
You meet codes in four places:
- the Cloud API, which the dashboard and your scripts call;
- the Gateway, which answers agents, either at the HTTP level or as a refusal of one tool call;
- the client SDKs (
@kblockai/clientand the Python packagekblock), which turn Gateway answers into typed errors and results; - the dashboard, when it cannot get an answer from the Cloud API for your browser.
Use your browser's find function to look up a code. Related pages: Action statuses, Roles and permissions, Common problems.
How errors look
Cloud API errors
Every Cloud API error has the same JSON body and a matching HTTP status:
{
"error": {
"code": "FORBIDDEN",
"message": "your role (viewer) does not allow this",
"details": { "permission": "resources.write", "role": "viewer" }
}
}details is optional and depends on the code: for example issues for validation errors, required_scope for a management key without a scope, retry_after_seconds for rate limits. Every response carries an x-request-id header. When you contact K-Block support about a problem, give the code and this request ID. A 500 INTERNAL_ERROR contains no details of what failed; the request ID lets K-Block support find them. Some problems on K-Block's side have codes for K-Block's own diagnosis; see Server-side problems.
In the dashboard, an error box shows the message, guidance for codes it knows, then Code: and the request ID. For a problem on K-Block's side with a code for K-Block's own diagnosis, it shows a description in product terms instead of the code and the message, and the request ID when the answer has one (see Server-side problems and Dashboard codes).
Gateway answers
The Gateway answers in two ways:
- HTTP-level errors happen before any tool is looked at (wrong key, rate limit, Gateway unavailable). They are HTTP status codes with a JSON-RPC error body. See Gateway HTTP errors.
- Tool refusals are normal MCP tool results with
isError: true. The K-Block part is instructuredContent.kblock:
{
"isError": true,
"structuredContent": {
"kblock": {
"status": "approval_pending", // one of 11 refusal statuses
"code": "APPROVAL_PENDING", // the precise reason
"detail": "the call requires approval; …",
"protected_action_id": "<action-id>", // when an action was recorded
"approval_request_id": "<approval-id>", // when there is one
"expires_at": "…" // for pending and expired actions
}
}
}Some refusals also carry retryable, and refusals of recorded decisions may carry a policy explanation (see What agents are told). See Gateway tool refusals.
Cloud API codes
Requests and sign-in
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
VALIDATION_FAILED | 400 | The body or query is invalid. details.issues lists each problem with path, code and message. | Fix the listed fields. |
INVALID_INPUT | 400 | A value passed the request format but was refused when it was applied (for example an expiry time in the past). The message says which. | Fix the value. |
INVALID_JSON | 400 | The body is empty or not valid JSON. | Send a JSON body. |
INVALID_REQUEST | 400 | The request is malformed in another way (for example a wrong content length). | Check the request. |
PAYLOAD_TOO_LARGE | 413 | The body is too large. | Send less data. |
UNSUPPORTED_MEDIA_TYPE | 415 | The body is not application/json. | Set Content-Type: application/json. |
UNAUTHENTICATED | 401 | No valid session, or an invalid, revoked or expired management key. The reason is never given. | Sign in again, or check the key in API keys. |
INVALID_CREDENTIALS | 401 | Wrong e-mail address or password, an account whose address is not verified yet, or a disabled account (one answer for all cases). Also a wrong password when confirming an e-mail change link. | Check both, or have a new verification link sent. |
CSRF_FAILED | 403 | The session's security token or the Origin header was refused. | Reload the page and try again. |
EMAIL_NOT_VERIFIED | 403 | Your account's address is not verified, so only account routes work. | Open the verification link, or send a new one from your account page. |
INVALID_CURRENT_PASSWORD | 403 | The current password you entered is wrong. | Enter it again. |
INVALID_OR_EXPIRED_TOKEN | 400 | A verification or reset link is invalid, used, replaced or expired. | Request a new link. |
EMAIL_TAKEN | 409 | Another account uses that address. | Use another address. |
EMAIL_DELIVERY_FAILED | 503 | K-Block's e-mail service did not accept the message. Sent with Retry-After. | Try again later. |
RATE_LIMITED | 429 | Too many requests. Sent with Retry-After and details.retry_after_seconds. | Wait that long, then retry. |
Permissions
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
NOT_FOUND | 404 | The object does not exist, or you are not a member of its organization (or the key belongs to another one). | Check the ID and the account or key you use. |
FORBIDDEN | 403 | Your role, or the key's scopes, do not allow this. details names the permission and role, or the required_scope. | See Roles and permissions. |
ADMIN_REQUIRED | 403 | The change puts something into service or changes what policies decide (enabling a tool, switching an agent's policy, and similar). | Ask an owner or admin. |
OWNER_REQUIRED | 403 | Only an owner can do this (owner role changes, observe settings). | Ask an owner. |
Members and invitations
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
LAST_OWNER | 409 | The change would leave the organization without an enabled owner. | Make another member owner first. |
ALREADY_MEMBER | 409 | The invited person is already a member. | Change their role instead. |
INVITATION_EXISTS | 409 | An open invitation for that address exists. | Revoke it first, or let them use it. |
INVITATION_INVALID | 404 | The invitation does not exist or is no longer valid. | Ask for a new invitation. |
INVITATION_EXPIRED | 409 | The invitation has expired. | Ask for a new invitation. |
INVITATION_EMAIL_MISMATCH | 403 | You are signed in with a different address than the invited one. | Sign in with the invited address. |
PLAN_LIMIT_EXCEEDED | 402 | A plan limit is reached: members, API keys, webhooks, agents, MCP servers, tools, policies or monthly protected actions. For members, open invitations count too. On the Developer plan every invitation is refused, and the message ends with "Developer is for one user. Upgrade to Startup to add team members." Accepting an invitation is refused too, and that message ends with "Developer is for one user. The organization's owner can upgrade to Startup to add team members." | Upgrade on Billing or free up capacity. Team membership starts with Startup. |
Names, state and concurrency
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
NAME_TAKEN | 409 | An agent, MCP server or policy with that name, or a tool with that exposed name, exists. | Choose another name. |
SLUG_TAKEN | 409 | The organization slug is in use. | Choose another slug. |
CONFLICT | 409 | A concurrent change, or a limit described in details.reason (for example TOO_MANY_DELEGATIONS, TOO_MANY_IDENTITIES). | Reload and retry, or act on the reason. |
INVALID_STATE | 409 | The object is not in a state that allows this (for example revoking an already revoked key). | Reload to see the current state. |
ALREADY_DECIDED | 409 | The approval request is no longer pending. | Reload: someone decided it, or it expired. |
POLICY_VERSION_REPLACED | 409 | A rollback or emergency stop replaced the policy version the request was decided under and closes its pending approvals, so it can no longer be approved. | Nothing to approve: the agent's identical call is decided by the policy now in force. |
IDEMPOTENCY_KEY_REUSED, REPLAY, EXPIRED, CANCELLED | 409 | The request conflicts with an earlier one or with the action's state (EXPIRED also when an approval request's expiry has passed). | Reload and check the action's status. |
IN_USE | 409 | The MCP server's tools have recorded actions, so it cannot be deleted (the records of those actions are kept). | Disable the server instead. |
EVIDENCE_EXPIRED | 410 | The receipt's hosted copy (its bundle and signed objects) was deleted after the organization's retention period. The receipt is not invalid: details carries its IDs, outcome, bundle_sha256, bundle_size, issued_at and evidence_deleted_at. | Verify the .kbundle you downloaded before then; its SHA-256 is details.bundle_sha256. |
ENDPOINT_DISABLED | 409 | Test events and redeliveries go only to enabled webhook endpoints. | Enable the endpoint first. |
BINDING_CHANGED | 409 | The tool's upstream binding changed after the page loaded it, so nothing was authorized. | Review the tool again and re-authorize. |
Identities, signatures and verification
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
NO_PRINCIPAL | 409 | The organization has no principal identity yet. | An owner sets it under Settings. |
NO_APPROVERS, TOO_MANY_APPROVERS | 409 | No member, or more than 32 members, match an approver rule. | Adjust the rule or members' identities. |
IDENTITY_ALREADY_BOUND | 409 | The identity is already bound, to your account or another one, or it was revoked: a revoked identity is never bound again. | Reload to see your identities; otherwise generate a new identity. |
VERIFICATION_FAILED | 422 | A signed object did not verify. | Re-create and re-sign it. |
IDENTITY_INVALID, CHALLENGE_INVALID | 422 | An identity document or its challenge is invalid. | Start the binding again. |
IDENTITY_EQUIVOCATION | 422 | Conflicting identity documents exist for a key. | Contact K-Block support with the code and request ID. |
IDENTITY_MISMATCH, IDENTITY_UNKNOWN, IDENTITY_WRONG_ACTOR_TYPE | 422 | A KID in the request is not described by the submitted identity documents, is not registered, or is the wrong kind of identity. | Submit the KID's public identity documents, or use the right KID. |
| Other verification codes | 422 | A K-Block evidence check failed; details.kblock_code names the protocol error. | See Receipt verification. |
Tools, MCP servers and discovery
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
MCP_SERVER_NOT_FOUND | 422 | mcp_server_id does not name a server of this organization. | Pick an existing server. |
UPSTREAM_TOOL_NOT_FOUND | 422 | The upstream server does not list a tool with that name. | Run discovery and pick a listed tool. |
UPSTREAM_SCHEMA_INVALID | 422 | The upstream tool's input schema is not an MCP object schema of at most 64 KiB. | Provide input_schema yourself. |
URL_NOT_ALLOWED | 422 | The URL is refused by the outbound policy (for example a private address); details.reason says why. K-Block only connects to public https addresses: private, loopback and internal addresses are refused. | Use a public https URL. |
UPSTREAM_UNREACHABLE, UPSTREAM_ERROR | 502 | The MCP server could not be reached, or answered with an error, during discovery. | Check the server and its URL. |
UPSTREAM_TIMEOUT | 504 | The MCP server did not answer in time. | Retry; check the server. |
UPSTREAM_REFUSED | 422 | The upstream address is not allowed by the outbound policy (K-Block only connects to public https addresses); details.reason says why. | Use a public address. |
UPSTREAM_CREDENTIAL_INVALID | 409 | During discovery or when a tool is added: the MCP server's stored authorization header cannot be used. K-Block cannot read it (details.reason is undecryptable), or it is not a valid header value (invalid_format). | Enter the authorization header again in the server's Server settings. If several servers report this at once, contact K-Block support with the code and request ID. |
DISCOVERY_TOO_LARGE | 502 | The upstream's discovery answers are too large in total. | Provide input_schema instead of discovering it. |
DISCOVERY_BUSY | 429 | Too many discoveries are running. Sent with Retry-After. | Retry later. |
CALLER_EXECUTED | 422 | The integration is decision only: it has no URL, server KID or authorization header, and nothing to discover. | Declare its tools instead; change only its name or status. |
INVALID_AMOUNT, INVALID_ARGUMENTS | 422 | A dry run or simulated call has an amount or arguments K-Block cannot bind. | Fix the call's input. |
Policies and rollout
| Code | HTTP | Meaning |
|---|---|---|
POLICY_INVALID | 422 | The policy document is invalid; details.issues lists every problem. |
POLICY_NOT_FOUND | 422 | policy_id does not name a policy of this organization. |
TEMPLATE_NOT_FOUND | 404 | The template does not exist. |
DRAFT_EXISTS | 409 | An identical draft exists; details names it. Activate that one. |
POLICY_VERSION_LIMIT | 409 | The organization holds the most policy versions, or bytes, it may (versions are kept forever). |
ALREADY_ACTIVE | 409 | This version is already active. |
ACTIVE_VERSION_CHANGED, IMPACT_CHANGED, SHADOW_CHANGED | 409 | Something changed since you reviewed it. Review again. |
EXAMPLES_FAILING | 409 | Saved examples do not get their expected outcome under this version. |
GATEWAYS_NOT_UPGRADED | 409 | The version uses newer policy-language features that K-Block has not yet enabled on every Gateway, so it was not activated and the current version stays in force; details.language_gate shows why. Activation is refused with this code until the features are enabled everywhere: try again later, or contact K-Block support. |
SHADOW_IS_ACTIVE | 409 | The active version cannot also be the shadow version. |
NOTHING_TO_ROLL_BACK | 409 | The policy has no earlier active version to roll back to. |
SIMULATION_MISMATCH | 400 | simulation_id is not a saved simulation of this version. |
EMERGENCY_ACTIVE | 409 | An observe window cannot start while the agent's policy is emergency-stopped. |
NO_ACTIVE_POLICY | 409 | The agent has no policy with an active version. |
NO_SHADOW | 409 | The policy has no shadow version. |
SIMULATION_LIMIT | 409 | Too many simulations of this policy were saved in the last 24 hours. |
EXAMPLES_INVALID | 400 | The examples are invalid. |
OBSERVE_DISABLED | 403 | Observe windows are off for the organization (only an owner can turn them on). |
OBSERVE_LIVE_NOT_ALLOWED | 403 | The owner has not allowed observe windows for live traffic. Every window needs that permission, test-only windows included. |
OBSERVE_WINDOW_TOO_LONG | 400 | The window is longer than the organization allows. |
OBSERVE_ACTIVE | 409 | The agent already has an open observe window. |
NO_OPEN_WINDOW | 404 | There is no open observe window to end. |
CONFIRMATION_MISMATCH | 422 | The typed confirmation does not match the agent's name. |
REASON_REJECTED | 400 | The reason looks like a secret and cannot be recorded in the audit log. |
REPORT_TOO_LARGE | 422 | The report exceeds its size or time budget. Narrow the window or scope. |
See Activate, roll out and roll back and Observe and shadow.
Billing
| Code | HTTP | Meaning |
|---|---|---|
PLAN_NOT_PURCHASABLE | 422 | That plan cannot be bought here: it is not a paid plan, or K-Block does not offer it for purchase. details.purchasable lists the plans you can buy. |
SUBSCRIPTION_ACTIVE | 409 | The organization already has a subscription that grants a plan (status active, trialing, past_due or scheduled_cancel); change or cancel it in Creem's customer portal with Manage subscription. |
CHECKOUT_IN_PROGRESS | 409 | A checkout for this plan is being created right now, for example after a double click. Try again in a moment. |
NO_BILLING_CUSTOMER | 409 | The organization has not completed a checkout yet, so there is no customer portal to open. |
BILLING_PROVIDER_ERROR | 502 | Creem, K-Block's billing provider, refused or failed the request, or did not answer in time. details.reason says what happened, for example timeout. Try again later; if it keeps happening, contact K-Block support with the code and the request ID. |
When plans cannot be bought or managed here, GET /api/v1/orgs/<org-id>/billing reports configured: false, the Plan card on Billing says Billing is not configured in this environment (see When billing is not configured), and checkout and the customer portal answer 503 without Retry-After, a problem on K-Block's side (see Server-side problems). If you need a paid plan, contact K-Block support with the request ID.
Server-side problems
| Code | HTTP | Meaning | What to do |
|---|---|---|---|
SERVICE_UNAVAILABLE | 503 | K-Block Cloud is temporarily unavailable (Retry-After: 5), too busy to check a password (with Retry-After), or cannot use the K-Block service identity. | Wait as long as Retry-After says, when it is sent, then retry; if it persists, contact K-Block support with the code and request ID. |
INTERNAL_ERROR | 500 | An unexpected error. | Contact K-Block support with the code and request ID. |
A 5xx answer with a code this page does not list, and a 503 without Retry-After, mean a problem on K-Block's side that you cannot fix. Examples: K-Block cannot send e-mail right now, plans cannot be bought or managed here, a stored receipt bundle is missing or does not match its recorded hash, or a stored secret of your organization cannot be read. The codes of these answers are for K-Block's own diagnosis. Retry later; if it keeps happening, contact K-Block support with the request ID from the X-Request-Id response header. GET /api/v1/gateway/identity answers 404 when no Gateway identity is registered yet. That is also a problem on K-Block's side: contact K-Block support with the request ID.
- If rejecting an approval request or cancelling an action fails because K-Block could not store its receipt bundle, nothing was recorded. Try again later.
- A webhook delivery whose endpoint's signing secret cannot be read fails, and its error says that the signing secret cannot be decrypted. Rotate secret on the endpoint stores a new signing secret.
- An MCP server's authorization header that cannot be read is reported as
UPSTREAM_CREDENTIAL_INVALIDinstead (see Tools, MCP servers and discovery).
The dashboard shows an answer whose code is for K-Block's own diagnosis without its code and message, as one of these messages:
- "K-Block cannot send e-mail right now, so no message was sent."
- "Plans cannot be bought or managed here right now."
- "K-Block could not complete this request because of a problem on its side." (for stored secrets, receipt storage and the Gateway identity)
It adds "If this keeps happening, contact K-Block support and give them the request ID below." and the request ID.
Gateway HTTP errors
These answers come before any tool is looked at, so nothing is recorded or executed.
| HTTP | Body | Meaning | What to do |
|---|---|---|---|
| 401 | JSON-RPC error -32001 | No valid gateway key (missing, malformed, unknown, revoked, expired, wrong kind, agent disabled, creator no longer allowed). | Check the key and its agent in the dashboard. See API keys. |
| 429 | JSON-RPC error -32000, Retry-After | The key sends too many requests. | Wait, then retry. |
| 503 | {"error":{"code":"DATABASE_UNAVAILABLE"}}, Retry-After: 5 | The Gateway cannot check the key right now: its database is unavailable or did not answer in time. | Wait as long as Retry-After says, then retry. If it keeps happening, contact K-Block support with the code and the x-request-id of the answer. |
| 503 | {"error":{"code":"GATEWAY_SHUTTING_DOWN"}}, Retry-After: 5 | The Gateway that received the request is shutting down. | Wait as long as Retry-After says, then retry. |
| 413 | JSON-RPC error -32600 | The request body is too large. | Send smaller arguments. |
| 400 | JSON-RPC error -32700 | The body is not valid JSON. | Fix the client. |
| 405 | JSON-RPC error -32000 | Wrong HTTP method: the Gateway is stateless and takes JSON-RPC over POST. | Use POST. |
| 500 | JSON-RPC error -32603 | An internal Gateway error; the message names a request ID. | Contact K-Block support with the request ID from the message. |
Gateway tool refusals
A refusal's status is one of these eleven values. Its code gives the precise reason. The answers of POST /v1/authorize use the same statuses and codes.
| Status | Codes | Meaning | What the agent should do |
|---|---|---|---|
denied | POLICY_DENIED, NO_POLICY, INVALID_POLICY, NO_DELEGATION, NO_PRINCIPAL, NO_APPROVERS, TOO_MANY_APPROVERS, INVALID_AMOUNT, INVALID_TOOL_CONFIGURATION, IDENTITY_EQUIVOCATION, ENGINE_REFUSED (or the workflow engine's own error code) | The decision refused the call; the action is recorded as denied. | Do not retry the same call; tell the user. |
denied | TOOL_REAUTHORIZATION_REQUIRED | The tool's binding changed and must be re-authorized. No new action was recorded and nothing was consumed. | An owner or admin re-authorizes the tool. |
denied | UPSTREAM_CHANGED | The tool changed since the decision. Nothing was consumed. | Call again for a new decision. |
denied | POLICY_CHANGED, OBSERVE_ENDED | An allowed or approved call was not run: the policy now in force does not allow it (or a rollback or emergency stop closed it), or the observe window it relied on ended. Nothing was consumed. | Retry: the identical call gets a new decision. |
denied | VERIFICATION_FAILED | The evidence no longer verifies (for example a revoked delegation). Nothing was consumed. | Tell the user; an admin checks the delegation. |
approval_pending | APPROVAL_PENDING | The call waits for approval. | Repeat the identical call later to resume it. |
rejected | REJECTED | An approver rejected it. A receipt exists. | Do not retry; tell the user. |
expired | APPROVAL_EXPIRED, TASK_EXPIRED, SUPERSEDED | It closed without running. | Call again if it is still needed: it gets a new decision. |
cancelled | CANCELLED | The organization cancelled it. A receipt exists. | Do not retry; tell the user. |
expired | AUTHORIZATION_EXPIRED | POST /v1/authorize repeated with the idempotency key of a decision-only call that was authorized, after its expires_at. It was authorized (the answer carries its IDs and its receipt's), but that is not permission to perform it now. Nothing new was recorded. | Do not perform the action now. If it is still needed, ask again without that idempotency key (or with a new one). |
replay | REPLAY | Another request already ran it. | Repeat with the same idempotency key to get the stored outcome; a call without a key gets a new decision. |
replay | EXECUTION_IN_PROGRESS, DUPLICATE_IN_FLIGHT | Another request is running the same call. | Wait and repeat with the same idempotency key. |
upstream_error | UPSTREAM_TOOL_ERROR, UPSTREAM_REFUSED | The upstream tool returned an error result, or a K-Block-aware upstream refused the evidence. | Read the upstream's error. |
upstream_error | UPSTREAM_UNREACHABLE, UPSTREAM_TIMEOUT, UPSTREAM_HTTP_ERROR, UPSTREAM_PROTOCOL_ERROR, UPSTREAM_BLOCKED, UPSTREAM_RESPONSE_TOO_LARGE, UPSTREAM_ERROR | The upstream call failed. | Check the upstream before retrying: for timeouts it may have acted. |
upstream_error | UPSTREAM_CREDENTIAL_INVALID, UPSTREAM_IDENTITY_UNKNOWN, UPSTREAM_IDENTITY_TOO_LARGE, UPSTREAM_EVIDENCE_TOO_LARGE | The Gateway cannot prepare the upstream call. Nothing was consumed. | For the first three, an owner or admin checks the MCP server's Server settings (authorization header, Server KID, Server identity documents), then the agent retries. UPSTREAM_EVIDENCE_TOO_LARGE comes back on every retry: tell the user. |
upstream_error | ATTESTATION_MISSING, ATTESTATION_INVALID, OUTPUT_NOT_CANONICAL, OUTPUT_NOT_STORABLE, RESULT_NOT_STORABLE, GATEWAY_ERROR | The upstream was called, but its result could not be accepted or stored as evidence. | Check the upstream: it may have acted. |
upstream_error | RESULT_NOT_RECORDED | The outcome could not be recorded; recovery will mark it failed later. | Check the upstream before retrying. |
plan_limit | PLAN_LIMIT_EXCEEDED | The organization's plan limit is reached. Nothing was recorded. | Upgrade the plan. |
invalid_request | UNKNOWN_TOOL, INVALID_META, INVALID_ARGUMENTS, INVALID_REQUEST, NOT_FOUND, IDEMPOTENCY_KEY_REUSED, INVALID_STATE | The request cannot be processed as sent, or an approved action could not be executed in its current state. | Fix the request, or check the action's status. |
invalid_request | DECISION_ONLY_TOOL, NOT_DECISION_ONLY | tools/call of a decision-only tool, or POST /v1/authorize for a tool the Gateway executes. Nothing was recorded. | Ask for a decision-only tool with POST /v1/authorize; call an MCP server's tool with tools/call. |
unauthorized | UNAUTHORIZED | The key was revoked or expired, or the agent disabled, while the request ran. | Check the key and agent. |
unavailable | DATABASE_UNAVAILABLE, GATEWAY_SHUTTING_DOWN | The Gateway cannot process the call now. | Retry when retryable is true. |
unavailable | GATEWAY_BUSY | Your organization has more calls in progress at this Gateway than it works on at once, and this one waited too long for its turn (see Limits). Nothing was recorded, consumed or executed; an approved call keeps its approval. retryable is true. | Retry the same call (same idempotency key) after a moment, and spread bursts out. |
The dashboard explains many of these codes on the action page. See Gateway and tools for diagnosis.
Client SDK errors
The client SDKs return Gateway decisions as results (a completed call or a refusal with the status and code above). They throw errors only for transport problems and for answers that are not K-Block results. @kblockai/client and the Python package kblock use the same class names and codes; Python spells the attributes in snake case (retry_after_seconds, outcome_unknown).
| Class | code | When | What to do |
|---|---|---|---|
KBlockAuthError | MALFORMED_API_KEY | The key is not in the K-Block format; nothing was sent. | Fix the key (look for whitespace or a truncated copy). |
KBlockAuthError | UNAUTHORIZED | The Gateway answered 401. | Check the key; retrying with it will not help. |
KBlockRateLimitedError | RATE_LIMITED | The Gateway answered 429. retryAfterSeconds says how long to wait. | Wait, then retry. |
KBlockUnavailableError | DATABASE_UNAVAILABLE, GATEWAY_SHUTTING_DOWN | The Gateway answered 503. | Retry later. |
KBlockUnavailableError | RPC_UNAVAILABLE | A JSON-RPC answer said the Gateway's database is unavailable (for example on tools/list). | Retry later. |
KBlockUnavailableError | NETWORK_ERROR, TIMEOUT, HTTP_ERROR | The connection failed, no answer came in time, or another 5xx answer came (for example from a proxy). | If outcomeUnknown is true, retry a tool call only with the same idempotency key. |
KBlockHttpError | HTTP_ERROR | Another non-MCP HTTP answer (for example 404 for a wrong URL, 413, or a redirect, which is never followed), or a request to another origin refused before sending. | Check the Gateway URL and the request size. |
KBlockProtocolError | NOT_A_KBLOCK_RESULT | The answer is not a K-Block Gateway result (for example a success without _meta.kblock). It is never treated as success. | Check that you are connected to a K-Block Gateway. |
KBlockRefusalError | the refusal code | A refusal thrown instead of returned by a framework integration: TypeScript LangChain with throwOnRefusal; Python LangChain (as its subclass KBlockToolRefusal), AutoGen and CrewAI with throw_on_refusal. Python's AutoGen tools also raise it from run_json by default. | Handle it like a refusal result; its result holds the refusal. |
KBlockError | TOO_MANY_PAGES | tools/list returned more than 1000 pages. | Check that you use the Gateway URL K-Block gave you; if you do, contact K-Block support with the code and the time it happened. |
All of them extend KBlockError, which has a code property. See the TypeScript client and Python.
Dashboard codes
When the dashboard cannot reach the K-Block service for your browser, or K-Block does not answer within 60 seconds, the dashboard shows "The dashboard could not reach the K-Block service. Try again in a moment." followed by "If this keeps happening, contact K-Block support and tell them when it happened." It shows no code, and there is no request ID. Nothing you entered was wrong, and nothing in your browser needs fixing. Reload the page and try again. If you were saving a change, check whether it was saved before you repeat it. If the problem continues, contact K-Block support and tell them when it happened.
If the dashboard is asked for an API path it cannot use, it shows "K-Block could not complete this request because of a problem on its side." with the same advice to tell K-Block support when it happened, and no request ID. Reload the page.
The browser part of the dashboard adds a few codes of its own when no usable answer arrives:
NETWORK_ERROR: your browser got no answer from the dashboard. Check your connection and reload the page.ABORTED: the request was cancelled.INVALID_RESPONSE: the answer could not be read.HTTP_<status>: an error answer that is not in the K-Block format.
For INVALID_RESPONSE and HTTP_<status>, reload the page; if the problem continues, contact K-Block support with the code and the time it happened.
The dashboard also refuses to submit a change for the wrong account. SESSION_CHANGED (409) means that the account signed in to this browser changed, in another tab or window, after this page prepared the change. The change is not carried out for that account, and nothing is recorded, not even an object you already signed. The message says "The account signed in to this browser changed (in another tab or window), so this was not done and nothing was recorded. The page now shows the account that is signed in: to act as the previous account, sign in to it again; otherwise check the page, then try again." See Your account.