hash-gaming / robotk

Mostly helpful but sometimes trolly
MIT License
2 stars 1 forks source link

Added some logging to catch an error #36

Closed YashdalfTheGray closed 6 years ago

YashdalfTheGray commented 6 years ago

Alright, is it rant time yet?!

<rant> Hubot, in all its wisdom uses Express 3 instead of Express 4 which has been out forever! So error handling is all fucked up so what we had to do was hook into the promise error handler. The logWhenError function has to take exactly 4 parameters otherwise things break because Express 3 determines what kind of middleware it is by doing some bullshitass reflection and if it doesn't take 4 parameters, then things literally don't work. 👏 Wow, just wow. </rant>

Anyway, please review.