Skip to content

Commit fa1049d

Browse files
SCAL-256912 updated the error message type
1 parent 178f408 commit fa1049d

File tree

3 files changed

+4707
-3618
lines changed

3 files changed

+4707
-3618
lines changed

src/embed/ts-embed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export class TsEmbed {
450450
...(this.embedConfig.customActions || [])
451451
]);
452452
if (customActionsResult.errors.length > 0) {
453-
this.handleError({ type: 'CUSTOM_ACTION_VALIDATION', message: customActionsResult.errors }, { errorType: 'VALIDATION_ERROR', message: customActionsResult.errors, code: 'CUSTOM_ACTION_VALIDATION', source: 'SDK', details: {} } as EmbedErrorDetailsEvent);
453+
this.handleError({ type: ERROR_CODE.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }, { errorType: 'VALIDATION_ERROR', message: customActionsResult.errors, code: ERROR_CODE.CUSTOM_ACTION_VALIDATION, source: 'SDK', details: {} } as EmbedErrorDetailsEvent);
454454
}
455455
const baseInitData = {
456456
customisations: getCustomisations(this.embedConfig, this.viewConfig),

src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6133,7 +6133,7 @@ export enum LogLevel {
61336133
*
61346134
* @param errorType - The type of error that occurred.
61356135
* @param message - A human-readable error message describing what went wrong.
6136-
* @param code - Optional error code providing a machine-readable identifier for the error.
6136+
* @param code - Error code providing a machine-readable identifier for the error.
61376137
* @param source - The source system or component where the error originated.
61386138
* @param details - Additional error details providing context-specific information.
61396139
*
@@ -6144,10 +6144,10 @@ export enum LogLevel {
61446144
* @version SDK: 1.44.0 | ThoughtSpot: 10.16.0.cl
61456145
*/
61466146
export interface EmbedErrorDetailsEvent {
6147-
errorType: 'API' | 'FULLSCREEN' | 'SINGLE_VALUE_FILTER' | 'NON_EXIST_FILTER' | 'INVALID_DATE_VALUE' | 'INVALID_OPERATOR' | 'VALIDATION_ERROR';
6147+
errorType: 'API' | 'FULLSCREEN' | 'SINGLE_VALUE_FILTER' | 'NON_EXIST_FILTER' | 'INVALID_DATE_VALUE' | 'INVALID_OPERATOR' | 'VALIDATION_ERROR' | string;
61486148
message: string | string[];
61496149
code: string;
6150-
source: 'API' | 'NETWORK' | 'SDK' | 'VALIDATION' | 'UNKNOWN';
6150+
source?: 'API' | 'NETWORK' | 'SDK';
61516151
details?: any;
61526152
}
61536153
export interface DefaultAppInitData {

0 commit comments

Comments
 (0)