AjaxDataSource redirect on session timeout

I have a Django app and I am trying to add a redirect mechanism if the AjaxDataSource responds with 403 / 401…

The site sees the error, I get it in the logs as well, if the URL with the data responds with 403 / 401 but cant seem to get the correct condition to catch it…

I tried cb_obj, referencing document and nothing :frowning:

I’m not so good at JS…

I used an interceptor to intercept the AJAXrequest and implemented a redirect mechanism

I’m glad you found an independent solution. It seems like adding a CustomJS hook for error condition would be a reasonable feature to make this simpler from Bokeh, if you want to open a github issue.