Skip to content

Errors

All errors from the MCP Server tool calls follow this consistent JSON structure:

json
{
  "error": {
    "name": "FlorentineApiError",
    "statusCode": 500,
    "message": "The provided Florentine API key is invalid. You can find the key in your account settings: https://florentine.ai/settings",
    "errorCode": "INVALID_TOKEN",
    "requestId": "abc123"
  }
}
FieldTypeDescription
namestringError class name (e.g. FlorentineApiError, FlorentineConnectionError)
statusCodenumberHTTP status code (e.g. 400, 500)
messagestringExplanation of what went wrong
errorCodestringError identifier (e.g. NO_TOKEN, INVALID_LLM_KEY)
requestIdstringUnique ID for this request (helpful for support and debugging)

Custom client error handling

The error object is returned as a stringified json in the content array:

json
{
  "content": [
    {
      "type": "text",
      "text": "{\"error\":{\"name\":\"FlorentineApiError\",\"statusCode\":401,\"message\":\"The provided Florentine API key is invalid. You can find the key in your account settings: https://florentine.ai/settings\",\"errorCode\":\"INVALID_TOKEN\",\"requestId\":\"uhv99g\"}}"
    }
  ],
  "isError": true
}

You may parse the JSON in text and handle the different errors inside your custom client/agent.

Common errors

Error NameerrorCodeMeaning
FlorentineApiErrorINVALID_TOKENThe Florentine API key is invalid
FlorentineApiErrorLLM_KEY_WITHOUT_SERVICEYou must provide a llmService if llmKey is defined
FlorentineApiErrorLLM_SERVICE_WITHOUT_KEYYou must provide a llmKey if llmService is defined
FlorentineApiErrorINVALID_LLM_SERVICEInvalid llmService provided
FlorentineApiErrorNO_OWN_LLM_KEYYou need to provide your own llm key
FlorentineApiErrorNO_ACTIVE_COLLECTIONSNo collections activated for the account
FlorentineApiErrorMISSING_REQUIRED_INPUTRequired input is missing
FlorentineApiErrorINVALID_REQUIRED_INPUTRequired input is invalid
FlorentineApiErrorINVALID_REQUIRED_INPUT_FORMATRequired input format is invalid
FlorentineApiErrorNO_QUESTIONQuestion is missing
FlorentineApiErrorEXECUTION_FAILURECreated aggregation execution failed
FlorentineApiErrorNO_CHAT_IDHistory chat id required but missing
FlorentineApiErrorTOO_MANY_TOKENSThe aggregation prompt exceeds the maximum tokens of the LLM model
FlorentineLLMErrorAPI_KEY_ISSUELLM API key is invalid
FlorentineLLMErrorNO_RETURNFlorentine.ai did not receive a valid LLM return
FlorentineLLMErrorRATE_LIMIT_EXCEEDEDLLM Request size too big
FlorentineConnectionErrorCONNECTION_REFUSEDCould not connect to database for aggregation execution
FlorentineCollectionErrorNO_EXECUTIONCreated aggregation could not be executed
FlorentinePipelineErrorMODIFICATION_FAILEDModifying the aggregation pipeline failed
FlorentineUsageErrorLIMIT_REACHEDAll API requests included in your plan depleted
FlorentineUnknownErrorUNKNOWN_ERRORAll occurring unknown errors