aslakhellesoy/eventsource-node — pull request #40 by adrai (2014-10-21 14:18:50+00:00)
Title: save statusCode if error

so you can do something like:

```javascript
source.onerror = function (err) {
if (err) {
if (err.statusCode === 401 || err.statusCode === 403) {
console.log('eventsource not authorized');
}
}
};
```