@thoughtspot/visual-embed-sdk
Version:
ThoughtSpot Embed SDK
43 lines • 4.61 kB
JavaScript
export const ERROR_MESSAGE = {
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
SDK_NOT_INITIALIZED: 'SDK not initialized',
SESSION_INFO_FAILED: 'Failed to get session information',
INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
LOGIN_FAILED: 'Login failed',
ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
};
export const CUSTOM_ACTIONS_ERROR_MESSAGE = {
INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
};
//# sourceMappingURL=errors.js.map