err.message is undefined use err instead
Merge pull request #922 from mattijle/master

err.message is undefined use err instead