extend rejection reason w/ json error on request error
This commit is contained in:
parent
6e3ce0aeb5
commit
36e6894859
2 changed files with 18 additions and 1 deletions
|
|
@ -51,7 +51,11 @@ module.exports = function($window) {
|
|||
|
||||
stream(response)
|
||||
}
|
||||
else stream.error(new Error(xhr.responseText))
|
||||
else {
|
||||
var error = new Error(xhr.responseText)
|
||||
for (var key in response) error[key] = response[key]
|
||||
stream.error(error)
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
stream.error(e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue