updated errorhandler to have cancelable