fix data parse error

example:

```javascript
rest.get(url).on('complete', function(data, res) {
  data.forEach(function(partData) {
    throw new Error("some error")
  })
});
```

Throw error:

```
TypeError: Object Error: Failed to parse JSON body: some error has no method 'forEach'
```