-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error object is unwrapped #2
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my development testing I noticed that my try/catch catches a standard Error object that returns a string of the original error object as an Error.message instead of the original Error object. You were trying to preserve the call stack in your code. A problem is that JSON.stringify() actually has a string size limitation so large objects can truncate. Theoretically the Error.message cannot be reconverted back to the original error object thrown and the string conversions are slow. You may have snuck in a non-standard variable into the Error object as "originalError" to try to work around the truncation problem (or for convenience). Would not creating a new AsyncblockError object inherited from the Error class to officially store the original error object technically be what we need instead?
The text was updated successfully, but these errors were encountered: