Resource loader 401

Hi all,

Is there a way I can hook into the resource loader so that I can handle network errors? My specific case is that I have a session token that may become invalid through inactivity. If the first network call that fails is for a resource fails I would like add specific behaviour.

TIA.

1 Like

What exactly do you mean by “resource loader”?

1 Like

It seems to that you want to prevent any HTTP calls (like backend service call) if the session is over. If that’s the case, then why not use the interceptor from the Aurelia fetch client? In the interceptor, prior to make the call, you can check for the validity of the token, and decide whether to move forward or not.

1 Like