onWarning: function(errorMessage) { /* Implements function to handle warning responses */ }
{
"code": alfanumeric,
"message": string
}
{
"code": 1000,
"message": "Cannot call "send" while template is still loading."
}
onError: function(errorMessage) { /* Implements function to handle error messages */ } // [optional]
{
"code": alfanumeric,
"message": string,
"detail": string
}
{
"code": 1200,
"message": "Template cannot be saved."
"detail": "Type mismatch: scope is undefined"
}
const beeConfig = {
...
extendedOnError: true // [optional, default/fallback: false]
...
}; {
code: 9900,
message: 'A generic network error occurred.',
detail: 'A network error occurred while calling service TEST https://beefree.io/test-url',
data: {
// an extract of Axios HTTP error details
"message":"Request failed with status code 404",
"status":404,
"code":"ERR_BAD_REQUEST",
"url":"https://beefree.io/test-url",
"method":"get",
"headers":{"Accept":"application/json, text/plain, */*"}
},
}onInfo: function (information) {
/* Implement function to handle info events such as when AI-generated text is applied */
}{
code: number,
message: string,
detail: object,
}
AddOn Information
{
"code": 1000,
"message": "Token usage for addon handle: ai-integration",
"detail": {
"handle": "ai-integration",
"promptId": "60bcc837-674c-4226-adad-91ee2a603b57",
"usage": {
"prompt_tokens": 50,
"completion_tokens": 100,
"total_tokens": 150,
"uid": "string"
},
},
}
{
"code": 1001,
"message": "Prompt '60bcc837-674c-4226-adad-91ee2a603b57' has been applied",
"detail": {
"handle": "ai-integration",
"promptId": "60bcc837-674c-4226-adad-91ee2a603b57",
"moduleId": "9c2c6e63-f9c3-4e8d-9e3e-f9a658fefe46",
"content": "Discover the Best Email Editor"
}
}
{"code":2200,"message":"required key not provided @ data[u'page'][u'body'][u'content'][u'style'][u'color']","error":"BAD REQUEST"}
{"code":3200,"message":"Resource Not Found","details":"http:\/\/myfsp.com\/docs\/errorcodes\/404"}

{"code":2200,"message":"required key not provided @ data[u'page'][u'body'][u'content'][u'style'][u'color']","error":"BAD REQUEST"}
{"code":4001,"message":"Authentication error","details":"Authentication header is missing"}