erquhart
erquhart15mo ago

Error cause object not supported

We discussed this somewhere in Discord but I can't find it. I asked about being able to pass the new-ish second argument to the Error constructor so I can provide a structured data via the cause property. Someone followed up that this was now supported, but it still doesn't work because the Convex tsconfig has ES2021 in the compilerOptions.lib array, whereas the new error signature requires at least ES2022. Any chance ES2022 can work for convex or will that break things? I see it's in the "don't touch this" section of the config.
2 Replies
ballingt
ballingt15mo ago
This should be fine! These tsconfig.json defaults are due for an update (but won't automatically be updated for existing projects). Can't say there's no chance this will "break things" insofar as there may be new APIs that this tsconfig setting adds types for that are not implemented. But if it does it's a bug, either requiring documentation or implementing the API.
erquhart
erquhartOP15mo ago
Awesome, thank you!

Did you find this page helpful?