change how REST api errors are reported

```
NOTE: this is an API breaking change for the callback
```

Process the json object into an error object if there are errors. This
is more idiomatic for node than to return true | false for the error
argument.