blakmatrix/node-zendesk — pull request #37 by jzabel (2014-09-12 16:16:20+00:00)
Title: Add emit errors to failed requests to capture them instead of failing si...

...lently

Had this error in production:
"error":"TypeError: Cannot read property 'next_page' of undefined at /node_modules/node-zendesk/lib/client/client.js:202:28
at Request._callback (/home/ubuntu/www/node_modules/node-zendesk/lib/client/client.js:164:5)\n
at Request.self.callback (/home/ubuntu/www/node_modules/request/request.js:121:22)\n
at Request.emit (events.js:98:17)\n
at Request. (/home/ubuntu/www/node_modules/request/request.js:985:14)\n
at Request.emit (events.js:117:20)\n
at IncomingMessage. (/home/ubuntu/www/node_modules/request/request.js:936:12)\n
at IncomingMessage.emit (events.js:117:20)

This would allow the module to emit errors (and capture them) instead of just failing silently.