Use `serialize-error` module (`Error#cause` support)
See original GitHub issueI noticed that RTK’s error serialization is rather simple:
For example this does not support nested errors, like the new cause
property: https://v8.dev/features/error-cause
I know RTK supports specifying a custom serializeError
as an option, but it’d be great to support the cause
property out of the box, perhaps using an existing solution for error serialization:
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
serialize-error - npm.io
Error constructors. When a serialized error with a known name is encountered, it will be deserialized using the corresponding error constructor, while unknown ......
Read more >Top 5 serialize-error Code Examples - Snyk
To help you get started, we've selected a few serialize-error examples, based on popular ways it is used in public projects. Secure your...
Read more >cause - Npms.io
Light-weight helpers for handling JavaScript Errors in node.js and the browser. Helps with long stack traces, Error subclasses, wrapping internal errors ...
Read more >Errors | Node.js v19.3.0 Documentation
An attempt was made to use a URL of an incompatible scheme (protocol) for a specific purpose. It is only used in the...
Read more >unable to use serialize-error package In nodejs - Stack Overflow
This issue was solved by using the old version of this library. I was using its latest version. but its old version working...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Honestly, at this point only interested in B - A would probably make the types explode.
Ping! @phryneas @markerikson