Skip to content

Error Reference

CodeMeaningWhen
200OKSuccessful request
202AcceptedAsync operation queued (audio transcription, MCP notifications)
204No ContentMCP session terminated
400Bad RequestInvalid input, missing required fields
401UnauthorizedMissing or invalid auth token
403ForbiddenMCP session belongs to a different user
404Not FoundResource doesn’t exist, or MCP session has expired
426Upgrade RequiredWebSocket upgrade header missing on a WebSocket endpoint
502Bad GatewayUpstream service failure (e.g., Clerk metadata fetch failed)

GraphQL always returns HTTP 200 for successfully parsed queries, even when the operation itself fails. Errors appear in the errors array of the response body.

{
"data": null,
"errors": [
{
"message": "Unexpected error.",
"extensions": { ... }
}
]
}

Error messages are masked in production for security. Client-facing messages are intentionally generic to avoid leaking internal state. Detailed error information is available in server logs.

MCP uses JSON-RPC 2.0. Protocol-level errors use standard JSON-RPC error codes:

CodeNameMeaning
-32700Parse ErrorInvalid JSON in the request body
-32600Invalid RequestMalformed JSON-RPC 2.0 structure (missing jsonrpc, method, etc.)
-32601Method Not FoundUnknown method or tool name
-32602Invalid ParamsMissing or invalid required parameters
-32603Internal ErrorUnhandled exception during processing

Tool-level errors (e.g., “document not found”) are returned as successful JSON-RPC responses with isError: true in the result. This distinguishes business logic errors from protocol errors.

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{ "type": "text", "text": "Error: Document not found" }],
"isError": true
}
}

All 401 responses include a WWW-Authenticate header for OAuth discovery:

WWW-Authenticate: Bearer resource_metadata="https://api.ontrove.sh/.well-known/oauth-protected-resource"

MCP clients use this header to automatically discover the Clerk authorization server and initiate the OAuth flow.

No token was provided. Include a Bearer token in the Authorization header or a session token in the __session cookie.

The Clerk session token has expired or is malformed. Obtain a fresh token from Clerk. Session tokens typically expire after a few minutes and must be refreshed using the Clerk SDK.

The MCP session was created by a different user than the one in the current auth token. Each MCP session is bound to the user who created it. Create a new session with the correct credentials.

The MCP session ID in the MCP-Session-Id header does not correspond to an active session. HTTP transport sessions expire after 1 hour. Start a new session by sending an initialize request without a session ID.

The connector ID provided does not exist in your database. Verify the ID using trove_list_connectors or the connectors GraphQL query.

The document ID does not exist. Document IDs are 16-character hex strings. Verify the ID from your search results (the value inside [doc:...] brackets in MCP responses).