visionmedia/superagent — pull request #519 by defunctzombie (2014-12-23 03:16:02+00:00)
Title: remove arity check for `.end()`

.end() would previously take a function with 1 or two arguments. With 1
argument it would return a `response` and with two it would be `error,
response`. This change makes the callback always accept `error,
response`.

Additionally, the `error` event is emitted if there are any error
listeners. This avoid errors crashing the app if there are no listeners.

This is the first PR in a series of updates for the new error handling.