onWarning
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 beeConfig:
Response
Example
Warning codes
Code | Message | Detail |
---|---|---|
| bee.save is unavailable |
|
| Unknown module name | [Grouping Content tiles]Unknown module name. |
| Duplicate module | [Grouping Content tiles]Duplicate module |
| Invalid modulesGroups configuration | [Grouping Content tiles]Invalid modulesGroups configuration |
| AMP content detected | 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 |
| Workspace not available in current plan | The workspace you have configured for the builder is not available for your subscription plan. Message: |
| 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: |
| Feature not available in current plan | The feature you have configured for the builder is not available for your subscription plan.
Message: |
| Content defaults for the Table module is not valid | Your content defaults are not valid for the table module. |
| Generic Bump Error | [Template validation] Default generic bump error |
| 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 |
| Invalid Target Version | [Template validation] The target version does not exists |
| [validation error detail] | [Template validation] The JSON didn’t pass the validation. The cause may be:
Message e.g.: |
| 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) |
| Missing Template Version | [Template validation] There is no template version in the page |
| Invalid Template Version | [Template validation] There is no template version in the page |
| Transformation Error | [Template validation] Issues during JSON version migration |
| Backward Transformation Error | [Template validation] Issues during JSON version migration |
| 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
To handle these errors, add the onWarning callback to beeConfig:
Response
Example
OnInfo Callback
The onInfo
callback is specifically designed for the AI Writing Assistant AddOn 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:
Response
Example Response on prompt generation
Here’s an example of the data you can expect when the user asks to generate content:
Example Response on prompt apply
Here’s an example of the data you can expect when the user applies AI-generated content:
Last updated