this module ignores errors
75lb opened this issue · comments
Lloyd Brookes commented
this line leads to unreported errors and my Koa app failing silently:
https://github.com/koajs/static/blob/master/index.js#L44
I had a bug in upstream middleware which I had no idea about, as the error ("Can't set headers after they are sent."
) was being swallowed by the above line.
It doesn't seem good practise to ignore errors, it reminds me of on error resume next
in the dark days of Visual Basic. Can this be avoided?