An issue I found when throwing deserialized errors is that the thrown error has no reference to this throw
point.
I think the "correct" way to throw serialized errors would be something like:
throw new Error(serialized.message, {
cause: deserializeError(serialized),
});
Two drawbacks:
new Error
doesn't benefit from #70So how about:
throw deserializeError(serialized, {preserveStack: true});
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too