My app is build using Webix Jet.
I have a
webix.attachEvent(“onBeforeAjax”,function(request){ … });
that adds extra headers required by the backend API, ie. an Oauth2 bearer-token.
Now, I would like to add a global error-handler to all Ajax-calls. If the Bearer-token is expired, I need to handle that. And this can happen for almost all requests my app makes to the API.
How is that done? Is there perhaps something like an ‘onAjaxError’ event?