Uh oh!
There was an error while loading. Please reload this page.
Better error handling for sendFile - #3582
Conversation
dougwilson
left a comment
There was a problem hiding this comment.
Nice! Can you add a test that tests the condition in which you were encountering? That way we don't accidentally regress.
There was a problem hiding this comment.
Also, can you add back res.sendFile to the message? Helps people know what function the issue was to.
thevoidf
commented
Mar 4, 2018
if you pass something other than valid string like sendFile({}) you get: TypeError: path.substring is not a function. which is kind of confusing, so instead now you getting: path must be string |
dougwilson
commented
Mar 4, 2018
Makes sense. Just add a test for that so we have it there to not regress from a refactor 👍 |
thevoidf
commented
Mar 4, 2018
@dougwilson all test are passing on my system |
LinusU
commented
Mar 4, 2018
The build failures seemed unrelated, I restarted the two failed builds... |
so you don't get confusing errors like: function substring not found or something