If there is any expression evaluation error on interface, how can we display that error on UI if want to show to user. Reason for error need to display on UI.
Discussion posts and replies are publicly visible
As far as i understood the question you want to show not the technical details and just the basic details to the user that some error occurred. If my understanding is correct there is a checkbox which you need to disable it in permissions section in Admin console which gives the basic information about the error to the user.
Yeah just want to show the basic details to user.. actually in interface object when is there is any error in exporting data to Excel by any reason then we show One validation msg to UI. But the requirement is to show basic error details why this particular error occurred along with validation msg.
AFAIK I don't think there is a way to achieve it. You can build some logic around it but none of them will be 100% smooth.
The user will see the pink UI errors as is. Are you looking to customize those? what's the exact use case?
We are currently saving in a local variable "an error occurred while exporting the data " on the "onError" parameter. But we want to show the actual error, that appian is generating. In the user interface rule,for example, if we try to query a table with more than 50 columns, it says "numbe rof columns exceeded 50" something like that. But how do we display the same in the run time in sites?. The issue is that in higher environments, we are getting "an error occurred while exporting the data " even though the same code works fine lower environments. We want to know what is breaking the exportdatastoreentitytoexcel function. The documentation says it can export more than 100k records. I was able to export 300k records in lower environments. Not sure whether it is breaking due to view complexoty or something else in higher environments
This doesn't sound like an issue with the UI, it just sounds like you want to know what the error is, right? In this case I'd suggest looking at the tomcat-stdout.log and you should be able to find errors that occurred when exporting.
We want to display the actual error to the user in the run time. Is it possible?
I do not want to show such a technical error to any user. Typically he is not able to do anything about it.
Instead, I make sure, that the internal support process is working. Then I tell the user that there was an error and a support person takes care of it and will contact him.
But, requirements vary. AFAIK, there is no good way to display such a low level error message to the user.
Whether you can show the error message inline can vary depending on the function that you are using. If you're using the a!exportDataStoreEntityToExcel function, it doesn't currently have a way of exposing the error to the user. However, some other functions like a!writeRecords do allow you to return this information from the function.
That being said, I echo what Stefan said - I don't really see how it would be useful to the user to be able to see what the error is. It's much better to have the user report when they receive the error and have the dev team investigate (usually through the logs).
Agreed with Stefen & Peter. I don't see an advantage of showing error message to end user.