aacerox/node-rest-client — pull request #10 by wwwdata (2013-11-25 16:03:29+00:00)
Title: Registered methods errorHandling

Hi, in your documentation it says that error handling should work in the following way:

```
var req2=client.methods.jsonMethod(function(data,response){
// parsed response body as js object
console.log(data);
// raw response
console.log(response);
});

// handling specific req2 errors
req2.on('error',function(err){
console.log('something went wrong on req2!!', err.request.options);
});
```

But in this case, ```req2``` is undefined.

This was all caused by a missing return.