angular-restmod icon indicating copy to clipboard operation
angular-restmod copied to clipboard

$asPromise().catch() gets wrong callback parameter value

Open aantipov opened this issue 9 years ago • 2 comments

In code

...
.$asPromise()
.then(function(data){...})
.catch(function(err){...})

the err parameter is a data instance instead of Error object.

aantipov avatar Mar 05 '15 09:03 aantipov

The same problem is with the error callback passed to then

aantipov avatar Mar 05 '15 09:03 aantipov

But you can access the Error object inside that data instance, right?

agustinf avatar Apr 17 '15 15:04 agustinf