Forbid assign name
, stack
(maybe also cause
) to error.
It's common to assign values to error for debug.
throw Object.assign(new Error('message'), {someUsefulInfomationCantDisplayInMessage})
Normally it's fine, but if you happened have name
, stack
, this may break the error.
I happened use both name
and stack
in one place recently.
throw Object.assign(error, {name})
throw Object.assign(error, {stack})
throw Object.assign(new AggregateError([], ""), {errors})
throw Object.assign(error, {notNameNotStack})
throw Object.assign(error, {message}); // It's common to edit `.message`
No response
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