pouchdb/pouchdb — pull request #3157 by rudasn (2014-12-12 18:30:09+00:00)
Title: #3070 - attach doc id, reason, and status to replication error messages

This does two things:

1. Make sure the error message is a string so we don't end up with errors called [object Object] or whatever.
2. Attach the doc id, the response reason, and the response status to the error.

This only applies for errors in write replication. Let me know if and where errors are created so I can update those as well.

Considering this change the following code can be simplified:

```js
var non403s = errors.filter(function (error) {
return error.name !== 'unauthorized' && error.name !== 'forbidden';
});
```

to

```js
var non403s = errors.filter(function (error) {
return error.status !== 403;
});
```