Skip to main content
Toknbase
REFERENCE

Error Reference

A complete reference for all error codes you may encounter when using Toknbase. IC host for all connections:https://icp-api.io

Tip

Most errors include a human-readable message. If you're seeing a raw trap message, check the troubleshooting section at the bottom or contactsupport@toknbase.net.

Auth Errors

Most common
Unable to authenticateMCP server returns authentication failure

Cause

The Authorization header is missing from your hosted MCP config, the token has the wrong scope, or the token is expired/revoked.

Fix

1. Confirm your config includes headers: { Authorization: 'Bearer YOUR_AGENT_TOKEN' }. 2. Ensure the token has full_access or MCP-enabled scope — limited scope tokens fail silently. 3. Check Dashboard → Tokens for token status.

401 UnauthorizedMissing or invalid Authorization header

Cause

The request was made without an Authorization header, or with a malformed token value.

Fix

Every request must include: Authorization: Bearer YOUR_AGENT_TOKEN. Create tokens in Dashboard → Tokens → Service Identities.

403 ForbiddenToken exists but lacks permission

Cause

Agent token exists but lacks the required scope for this operation, or the secret is in a folder the token cannot access.

Fix

Check the token's scope and folder restrictions in Dashboard → Tokens. Create a new token with the correct scope (read_write or full_access).

Common Errors

IC0536Canister has no update method

Cause

The canister wasm is outdated or the method name is misspelled.

Fix

Check you're using the correct canister ID (4wj64-piaaa-aaaan-q5q7q-cai) and the latest MCP server version (@toknbase/mcp-server@1.7.0).

IC0502Canister trapped explicitly

Cause

The canister rejected the call, usually due to invalid input or a business logic check.

Fix

Read the error message for details. Common causes: duplicate secret name, invalid token, missing required fields.

IC0503Canister out of cycles

Cause

The canister has run out of compute cycles.

Fix

Contact support at support@toknbase.net immediately.

HTTP Errors

400Bad Request

Cause

Missing required fields or malformed request body.

Fix

Check the request body matches the expected schema. Use the API Reference for the correct field names.

404Not Found

Cause

Secret with that name does not exist.

Fix

Verify the secret name is correct. Use GET /api/secrets to list all available names.

429Too Many Requests

Cause

Rate limit exceeded.

Fix

Back off and retry after a short delay. Implement exponential backoff for production pipelines.

500Internal Server Error

Cause

Canister error or network issue.

Fix

Check canister status at dashboard.internetcomputer.org searching for 4wj64-piaaa-aaaan-q5q7q-cai. Retry after a few seconds.

Agent Token Errors

token_revokedAgent token has been revoked

Cause

The token was manually revoked in the Toknbase dashboard.

Fix

Create a new agent token in Dashboard → Tokens → Service Identities.

token_expiredAgent token has passed its expiry date

Cause

The token was created with an expiry and that date has passed.

Fix

Create a new agent token with a new expiry date in Dashboard → Tokens → Service Identities.

token_scope_exceededOperation requires higher scope

Cause

Trying to write with a read_only token, or other scope mismatch.

Fix

Create a token with the appropriate scope: read_write or full_access.

folder_restrictedSecret is in a restricted folder

Cause

The token has folder restrictions and the secret is in a folder the token cannot access.

Fix

Update the token's folder restrictions or create a new token scoped to the correct folder.

MCP Errors

method_not_foundMCP server version mismatch

Cause

The installed MCP server version doesn't match the canister's deployed methods.

Fix

Update to @toknbase/mcp-server@1.7.0: npx @toknbase/mcp-server@1.7.0. Or use the hosted endpoint which is always up to date.

agent_not_configuredTOKNBASE_AGENT_TOKEN not set

Cause

The TOKNBASE_AGENT_TOKEN environment variable is missing from your MCP config (self-hosted mode only).

Fix

Add TOKNBASE_AGENT_TOKEN to the env section of your MCP server config. For the hosted endpoint, use the Authorization header instead.

canister_unreachableCannot reach the ICP canister

Cause

Network issue, incorrect IC_HOST, or canister is temporarily unavailable.

Fix

Confirm IC host is https://icp-api.io (not ic0.app). Check your internet connection and retry after a few seconds.

Note

If you're seeing errors not listed here, check the status page attoknbase.net/statusor contact support atsupport@toknbase.net.

What's next

Was this page helpful?