-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
Steps to reproduce
I might be doing something wrong, but in a lot of cases when errors are thrown and converted to a Feathers GeneralError the details of the actual error that was thrown are missing. This is very frustrating when it is an error in say production, as you have no clue what is causing the error.
What I have noticed in my own code: when an error is thrown without the new keyword (throw Error versus throw new Error) the Feathers GeneralError does not contain the error details. So in my own code I have changed this everywhere to use the new keyword. However I do not have control over external modules I am using.
Expected behavior
I would expect errors to be caught by Feathers, converted to a General Error and for the original error details to be added to it.
Actual behavior
The error is caught and converted to a Feathers GeneralError but without the original error details.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
@feathersjs/feathers: 3.1.7
@feathersjs/errors: 3.3.0
NodeJS version: 10.9.0
Operating System: Windows 10 and Linuix 18.1
Browser Version: n/a
React Native Version: n/a
Module Loader: n/a