Hey team, we are trying to handle some

Hey team, we are trying to handle some errors using the EmbedEvent.Error, and I was wondering what your recommendations are for identifying specific errors. We have noticed that some of the errors have a code and an error code (please see the screenshot below). Is there a way we can access the list of error codes? Maybe we can do something like this: if (error.data.error[0].extensions.code === 12121) { console.log("Error message for code 12121"); } if (error.data.error[0].extensions.exception.message.includes('Error Code: QUERY_TIMED_OUT')) { console.log("Error message for QUERY_TIMED_OUT"); }
No description
6 Replies
shikharTS
shikharTS6mo ago
These are the high level error types we have : https://developers.thoughtspot.com/docs/events-app-integration#errorType. But for specific error codes, yes this looks like it should work. I would recommend using code instead of parsing the String and have a mapping internally.
Events and app interactions
Events allow the embedding application to send and receive messages from embedded ThoughtSpot components.
Alfredo
AlfredoOP6mo ago
Thanks @shikharTS, is there a way to disable low level errors when the app is in prod?
shikharTS
shikharTS6mo ago
Do you want to completely disable all low level errors? What is the usecase here?
Alfredo
AlfredoOP6mo ago
@shikharTS yes, ideally. The use case will be to avoid showing sensitive information in prod like this:
No description
shikharTS
shikharTS6mo ago
I have seen this usecase and raised internally with the team to implement this. For now can you use the code 12121 given above to hide these errors.
Alfredo
AlfredoOP6mo ago
Ok, thanks. I'll share that with my team.

Did you find this page helpful?