CorfedoCorfedoDocs
Reference

Errors

Every failure code of the HTTP API and MCP tools with its HTTP status and what to do, and where the CLI's exit codes are listed.

The HTTP API and the MCP tools share one set of failure codes. A failure has a code, a message and a correlationId. Include the correlationId when you report a problem to whoever runs Corfedo.

Failure body

{
  "code": "ambiguous_repository",
  "message": "Several repositories have this name; use a canonical name.",
  "correlationId": "0HN8…",
  "candidates": ["github.com/acme/payments", "gitlab.com/acme/payments"]
}
FieldPresent
code, message, correlationIdAlways
candidatesWith ambiguous_repository and repository_not_found: canonical names to choose from
retryAfterSecondsWith resource_exhausted and unavailable. The Retry-After header carries the same value.
scopeWith missing_scope: the scope the credential lacks
limitWith limit_exceeded: the spending limit that was reached and when it resets

Codes

HTTP statusCodeMeaningWhat to do
400, or 405, 413 or 415 for a wrong method, a body over the size limit or a wrong content typeinvalid_argumentA field is missing, unknown, malformed or out of range. For search, the message names the problem in the query and how to rewrite it.Fix the request
400ambiguous_repositorySeveral repositories you can read have this nameUse a canonical name from candidates
400https_requiredThe request used plain HTTPUse the https:// address
401unauthenticatedNo credential, or it expired or was revokedGet a new credential, or sign in again
403permission_deniedYour access does not allow the operation, or Corfedo AI is off for this kind of clientAsk for access, or ask an administrator to turn Corfedo AI on in Client access
403missing_scopeThe credential lacks the scope in scopeSign in again with the permission, or use a key that has it
403network_not_allowedThe workspace's or the key's network list leaves out your addressConnect from an allowed network, see Client access
404not_foundThe resource does not exist, or you cannot read itCheck the ID or path
404repository_not_foundNo repository you can read has this nameCheck the name. candidates can list similar names.
409conflictThe request conflicts with the current stateRead the current state and try again
409revision_changedThe object changed after you read itRead it again, then repeat the change
409already_existsAnother object already has this nameChoose another name
409failed_preconditionThe installation's configuration does not allow itAsk whoever runs Corfedo
409limit_exceededA monthly AI spending limit is reached. No answer started.Wait for the reset in limit, or ask an administrator to raise the limit
409conversation_busyAn answer in this conversation is still runningWait for it to end, or cancel it
409client_message_conflictThe client message ID was already used for another requestUse a new ID for a new message
409other_sourceThe conversation was started from another kind of clientContinue it where it started, or start a new conversation
409profile_unavailableThe AI profile chosen for this kind of client is not available to youAsk an administrator to change the profile or its availability
410continuation_expiredA page continuation is too oldStart the paged request again
429resource_exhaustedCorfedo is at capacityRetry after retryAfterSeconds
500internalAn unexpected failureRetry later. Report the correlationId if it persists.
503unavailableA service Corfedo needs is busy or not readyRetry after retryAfterSeconds
504deadline_exceededThe operation ran out of timeNarrow the request, or try again

Over the HTTP API, a code read whose revision or continuation is no longer served is not a failure. It answers with the status stale and the currentRevision, see Pages. An MCP tool returns the same case as the error stale_revision with currentRevision. Read again at that revision.

MCP connection errors

The MCP endpoint refuses some requests before any tool runs. The body then has error and correlationId instead of code and message.

HTTP statuserrorMeaning
403invalid_originA browser request from an origin the endpoint does not accept
413request_too_largeThe request body is too large

Answer stream errors

An answer stream that fails sends an error event with code, message and retryable, then ends. A run that ends without an answer reports its outcome on the run, not as a failure code. See Streaming.

CLI exit codes

The CLI maps these failures to exit codes, see CLI commands. With --format json, error.code holds the code from this page or a CLI code such as credential_store_unavailable or connection_mismatch.

On this page