Yes, that is normal behavior. You did already handle the error in
function(){
console.log('Object invalid')
return false
})
from where you did return a non-error value (false
). To continue with an error, throw another one, throw the same one, or don't use the second argument to then
but a separate addErrback
. Or put the error handler after the .then(lang.hitch(this, this.okCallback))
so it will handle errors from getValues
as well without affecting the okCallback
.