Base solution for your next web application
Open Closed

Global ajax error handling #8020


User avatar
0
razkhan78 created

Hi

We have AspNetZero (Paid) Product version --> 4.0 Product type --> MVC Product framework type --> .net core

Right now in default aspnetzero there is some global meachinsm which shows alert for error when any ajax call has some error. We have some specific errors for which we want to display different customized popup instead of error. So would you please let us know if there is any way we can override or exted that ajax call global error handling?

Thanks


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You may want to disable displaying the message for a particular AJAX call. If so, add abpHandleError: false into the abp.ajax options.

    see https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX#handling-errors

  • User Avatar
    1
    razkhan78 created

    No, we don't want to disable it, we want to extend that , as we want to utilize the global handling if there is one specific error.

    We found a file abp.jquery.js . Can we modify this file directly?

  • User Avatar
    0
    maliming created
    Support Team

    We found a file abp.jquery.js . Can we modify this file directly?

    The application may overwrite your changes when upgrading the package. I suggest you separate the code into a file.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.

  • User Avatar
    0
    suruat created

    I have the same issue, In the event the /AbpUserConfiguration/GetAll call fails I would like to navigate the user to a custom static error page, instead of showing the popup. I can't seem to find a way to do this, since it seems that the abp.ajax call handles the failure everythime.

    Whats the best way to send the user to a static page when GetALL call fails?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you try handling error yourself, see https://aspnetboilerplate.com/Pages/Documents/Javascript-API/AJAX#handling-errors. Just set abpHandleError to false in your request and handle error yourself.