AnsweredAssumed Answered

How To Override AJAX error handlers

Question asked by bbehling on Dec 3, 2015
Latest reply on Dec 7, 2015 by bbehling

Is it possible to override all task request (AJAX) error handlers? This would be for all tasks such as Query or Identify tasks.

 

I need to add specific actions to the error handlers and do not wish to manually add this to all existing error callback code.

 

 

EDIT -

 

Found this solution using Dojo ioPublish

IO Pipeline Topics — The Dojo Toolkit - Reference Guide

 

Which does work. However, this stackexchange post says that extr overrhead is incurred using ioPublish.

http://stackoverflow.com/questions/4781018/dojo-intercepting-xhr-calls

 

So I guess now the question is, will extra over head be incurred if only subscribing to the error topic?

 

EDIT 2 -

Turns out ioPublish error handler does not catch 401 errors. ESRI, please provide a solution for a global error handler.

Outcomes