Open Sebmaster opened 1 year ago
That line in the documentation predates the introduction of promises. There's another section in that same document that says this:
Domains will not interfere with the error handling mechanisms for promises.
I'd say the documentation needs an update. I'll add the label, PR welcome.
Version
v18.13.0
Platform
Darwin KFQ4RYQV5M 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 arm64
Subsystem
domain
What steps will reproduce the bug?
vs
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
The docs mention:
So I'd expect error.domain to be defined when looped through the domain.
What do you see instead?
When erroring within a Promise context, domain does not add the expected properties.
Additional information
Noticed this one when migrating off of Bluebird to native Promises.