actionFailure on gridModel does not trigger for anything except DataManager error

To Whom It May Concern,

What my development team use is "actionFailure" on all gridModels, so we put it in gridPresets, in order to have everywhere same error handling.

What we have noticed is that if the error does not come from a backend side/server/dataManager side and if grid fails to show completely or some parts of it due to some other "frontend" reasons, this actionFailure is not triggered at all, we only see errors in console.

Is this expected behaviour or not? If not, is there another trigger to be used for handling other types of failures/errors?

Thanks!

3 Replies 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team October 26, 2020 10:37 AM UTC

Hi Sabina, 

Greetings from syncfusion support 

By default the actionFailure event of the Grid component will be triggered for both mentioned client and server side errors. From validating your query and you have mentioned that “some parts of it due to some other "frontend" reasons”. We need more information for our clarifications. Please share the below details that will be helpful for us to provide better solution. 

1)        Please share us your exact requirement scenario with detailed description on this query. And share us what frontend reasons are not triggering the actionFailure event. 

2)        If possible please share the issue scenario in pictorial representation or video demonstration. 

3)        Please share the issue replication procedure step by step. 

4)        Please confirm your syncfusion package version. 


Regards,
Rajapandi R 



SM Sabina Muminovic October 27, 2020 08:47 AM UTC

Hi Rajapndi,

So,
1. syncfusion packages versions used:


2. gridModel example:

3. actionFailure on this doesn't do anything

Why am I doing/testing this?
In case there is some error coming from grid I just want to be sure that it's "catched" and showed properly in frontend for our users. (So far, I know how does errors coming from DataManager looks (their structure), so this part does not need further explanation. And I have not been able to reproduce (intentionally) any other errors.)

Can you also please explain/point in your code structure where to look for what actions/erros are throwing error on actionFailure event?

Thanks a lot!


RR Rajapandi Ravi Syncfusion Team October 28, 2020 12:20 PM UTC

Hi Sabina, 

By default the actionFailure event gets triggered when the dataManipulation gets failed and also triggered if the error occurs at the time of Grid rendering. For example if you have invalid dateFormat in your date column. While running the application, the grid cannot bind the invalid date format, so at the time it throws the error and triggers the actionFailure event.  

And if any error occurs at the server side and if you create any custom exception and throws the error it will triggers actionFailure event and send the http error message in the arguments. In your query you are defining invalid properties in toolbar for this case it will not triggered the actionFailure event. It was the default behavior. 


Regards, 
Rajapandi R

Marked as answer
Loader.
Up arrow icon