LogoLogo
Try it outResourcesAPIsAddOnsBook a demo
  • Getting Started
    • Introduction to Beefree SDK
      • Create an Application
      • Installation and Fundamentals
        • Configuration parameters
          • Configuration Reload
          • Workspaces
          • Debugging the Beefree SDK Editor
        • Methods and Events
        • Authorization Process
        • How the UID parameter works
        • Set up two-factor authentication
        • Naming conventions
      • Development Applications
      • Manage Users
      • Manage Subscriptions
      • Installation and Fundamentals
    • Tracking Message Changes
    • Sample Code
    • Release Candidate Environment
  • Visual Builders
    • Email Builder
    • Page Builder
      • Integrating Page Builder
      • Embedding videos in a page
    • Popup Builder
      • Popup Builder - Getting Started
      • Testing and Integrating
      • Setting layout and size
        • Advanced settings
    • AI-Driven Design Creation
  • APIs
    • Content Services API
      • Authentication
      • Export
      • Convert
      • Row Processing
      • AI Collection
      • Brand Style
    • Template Catalog API
      • Authentication
      • Templates
      • Categories
      • Collections
      • Designers
      • Tags
    • HTML Importer API
      • Authentication
      • Import HTML
  • Forms
    • Form Block
    • Integrating and using the Form block
      • Passing forms to the builder
      • Form structure and parameters
      • Form layout customization
      • Allowed form fields
      • Edit form field modal
  • Rows
    • Reusable Content
      • Create Reusable Content
        • Pre-build Reusable Content
          • Implement Custom Rows
        • Save Reusable Content
          • Implement Hosted Saved Rows
          • Implement Self-hosted Saved Rows
            • Self-hosted Saved Rows Concepts and Tutorial
      • Sync Reusable Content
        • Implement Synced Rows
        • Initialize Edit Single Row Mode
      • Manage Reusable Content
    • Storage for Reusable Content
      • Hosted Saved Rows
      • Self-Hosted Saved Rows
  • File manager
    • File manager application overview
      • Mime Types and Groups
  • Server-side configurations
    • Server-side options
      • Toolbar options
      • Storage options
        • Configure your AWS S3 bucket
        • Connect your file storage system
      • Content options
      • Services options
      • Undo & Changes history
      • Custom JavaScript Libraries Injection
  • Other Customizations
    • Advanced options
      • Special Links and Merge Tags
      • Content Dialog
      • Custom Color Palette
      • Font management
      • Roles and Permissions
      • Smart Merge Tags
      • Commenting
      • Custom Attributes
      • Meta Tags
      • Custom Languages
      • Display Conditions
      • Advanced Permissions
      • Custom File Picker
      • Custom Headers
    • Appearance
      • Content Defaults
      • Custom Sidebar Position
      • Content Tile Sorting
      • Content Tile Grouping
      • Loading Spinner Theme
      • Custom Tab Layout
      • Themes
      • Custom CSS
        • Change Log
    • AMP for Email
    • Collaborative Editing
      • Co-editing Integration Guide
    • Mobile Design Mode
    • Multi-language Templates
    • Cards Style and Image Round Corners
    • Hover Effect for Buttons
    • Content Area Padding
    • Line Height
  • Data Structures
    • Getting Started
    • Schema Catalog
    • Simple Schema
      • Template Schema
      • Definitions Schema
      • Row Schema
      • Column Schema
      • Title Schema
      • Image Schema
      • Button Schema
      • Paragraph Schema
      • HTML Schema
      • Menu Schema
      • List Schema
      • Icon Schema
      • Divider Schema
    • Row Metadata
    • Form Validation Schema
    • Comments Schema
      • Change Schema for Comments
  • Builder AddOns
    • AddOns
      • AddOns Overview
      • Partner AddOns
        • Partner AddOns directory
        • Installing Partner AddOns
        • DeepL
        • Stability AI
        • Azure AI Vision - Image Analysis
          • Alternate Text Generation with AI
          • AI Alt Text Bulk Generation
        • AI Writing Assistant
          • Available Providers
            • OpenAI
            • Azure OpenAI
            • Anthropic
          • AI Providers and Data Security
          • AI-Generated Meta Tag Fields
          • Token Upselling
          • Apply a Brand Tone
        • Custom AI Writing Assistant
      • Custom AddOns
        • AddOn Development
        • Contribute to the Partner AddOn Marketplace
      • AddOns Configuration
      • AddOn FAQs
  • Resources
    • Error Management
      • onWarning
      • Beefree SDK Editor Errors
      • File System Provider errors
      • JSON Parser errors
      • Template Validation and Update
      • Template validation and update errors
    • Scheduled maintenances
Powered by GitBook
LogoLogo

Policies

  • Privacy & Cookies
  • Terms of Services
  • GDPR Compliance
  • Trust Center

Contact Us

  • Submit a request
  • Book a demo
  • Report a security issue

Resources

  • Developer website
  • Create a Developer Account

© Bee Content Design, Inc. San Francisco, CA | Part of Growens

On this page
  • Configuration
  • Response
  • Example
  • Warning codes
  • onError callback
  • Configuration
  • Response
  • Example
  • OnInfo Callback
  • Response
  • Example Response on prompt generation
  • Example Response on prompt apply

Was this helpful?

Export as PDF
  1. Resources
  2. Error Management

onWarning

PreviousError ManagementNextBeefree SDK Editor Errors

Last updated 8 months ago

Was this helpful?

The onWarning callback returns information about a soft error that doesn’t impact the normal usage of the builder. You can use this callback to track these errors, display a message or change any behavior in your application. The callback manages JSON as the output data format.

Configuration

To handle these warnings, add the onWarning callback to :


onWarning: function(errorMessage) { /* Implements function to handle warning responses */ }

Response


{
    "code": alfanumeric,
    "message": string
}

Example


{
    "code": 1000,
    "message": "Cannot call "send" while template is still loading."
}

Warning codes

Code
Message
Detail

1000

bee.save is unavailable

  • Cannot call bee.save() while template is still loading. Use the onLoad callback to determine when it’s safe to use the save method.

  • After onLoad(), if bee.save() is not accessible, it’s due to an expired token.

1610

Unknown module name

[Grouping Content tiles]Unknown module name.

1620

Duplicate module

[Grouping Content tiles]Duplicate module

1630

Invalid modulesGroups configuration

[Grouping Content tiles]Invalid modulesGroups configuration

1701

AMP content detected

1702

Workspace not available in current plan

The workspace you have configured for the builder is not available for your subscription plan.

Message: Workspaces not available in [${payload}] plan

1703

Action not available when loading template

The action you’re trying to perform on the builder instance is not available during the loading of a template. Message: Cannot execute ${payload} during the template Loading

1704

Feature not available in current plan

The feature you have configured for the builder is not available for your subscription plan. Message: [${featureName}] feature is not available in [${plan}] plan

1730

Content defaults for the Table module is not valid

2000

Generic Bump Error

[Template validation] Default generic bump error

2050

Generic Bump Error with warnings

[Template validation] Generic bump error, with warnings.

Note: This error is dynamic. Depending on the scenario, you will receive a different error message.

Use case: When the Bumper returns 200, but there are some portions of the JSON that should be corrected (for example unrecognized fields). The SDK triggers the onWarning, passing to the host-application an additional "warnings" array, containing the warning messages.

2100

Invalid Target Version

[Template validation] The target version does not exists

2200

[validation error detail]

[Template validation] The JSON didn’t pass the validation. The cause may be:

  • Missing keys

  • Added unknown keys

Message e.g.: required key not provided @ data[u'page'][u'body'][u'content'][u'style'][u'color']

2250

Bump template validation error

page/rows/0/columns/0/modules/0/descriptor/table/rows: malformed field (each row must contain the same number of cells)

2300

Missing Template Version

[Template validation] There is no template version in the page

2400

Invalid Template Version

[Template validation] There is no template version in the page

2500

Transformation Error

[Template validation] Issues during JSON version migration

2600

Backward Transformation Error

[Template validation] Issues during JSON version migration

3000

Service Error

[Template validation] System failure not related with invalid json files

onError callback

The onError callback returns information about the application errors. You can use this callback to track these errors, display a message or change any behavior in your application. The callback manages JSON as the output data format.

Configuration


onError: function(errorMessage) { /* Implements function to handle error messages */ } // [optional]

Response


{
    "code": alfanumeric,
    "message": string,
    "detail": string
}

Example


{
    "code": 1200,
    "message": "Template cannot be saved."
    "detail": "Type mismatch: scope is undefined"
}

OnInfo Callback

onInfo: function (information) { 
  /* Implement function to handle info events such as when AI-generated text is applied */ 
}

Response

{
  code: number,
  message: string,
  detail: object,
}

Example Response on prompt generation

Here’s an example of the data you can expect when the user asks to generate content:


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"
    },
  },
}

Example Response on prompt apply

Here’s an example of the data you can expect when the user applies AI-generated content:

{
    "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"
    }
}

The template loaded in the builder contains AMP content, but the builder is not configured with an AMP-compatible workspace. You can react to this warning by loading a workspace, using the . Message: AMP content has been loaded

Your are not valid for the table module.

To handle these errors, add the onWarning callback to :

The onInfo callback is specifically designed for the and provides real-time usage data with each response, without storing or tracking the information. It also notifies your application when a user clicks on Apply for any AI-generated text suggestion.

To configure this in your app, add the onInfo callback to your :

beeConfig
beeConfig
AI Writing Assistant AddOn
beeConfig
loadWorkspace(type) method
content defaults