09:46 | <Andreu Botella> | A single promise could be branched multiple times, and |
09:47 | <Andreu Botella> | the way I think of it, if an exception (or promise rejection) is "automatically rethrown" (as might happen conceptually in run ), then if you have a way to act on that error, then that context shouldn't be lost without a trace |
09:48 | <Andreu Botella> | if you choose to catch an exception/rejection and rethrow it, then you might choose to use the original throw context, or switch it depending on your use case |
09:48 | <Andreu Botella> | the same way you'd wrap with a higher-level exception at API boundaries |
09:48 | <Andreu Botella> | the inner throw context would be an implementation detail |
09:49 | <Andreu Botella> | am I making sense? |
09:53 | <Chengzhong Wu> | the way I think of it, if an exception (or promise rejection) is "automatically rethrown" (as might happen conceptually in |
09:55 | <Andreu Botella> | well, I was thinking of how run() essentially rethrows a thrown exception, or how a .then() without a catch handler essentially rethrows a promise rejection, without any user code |
10:14 | <Chengzhong Wu> | A handled promise could be
|
10:36 | <Chengzhong Wu> | I don't think this is a problem. Context splits are not problematic, only merges are. If you only care about one of the branched promises but not the rest, you could still want to know the source of rejection |
10:37 | <Andreu Botella> | I guess both p1 and p2 could be contexts you might want, it's the same pass-around vs pass-through distinction |
10:38 | <Chengzhong Wu> | yeah, it could be. I'm saying that the flow-around is not something that is not desired. |
13:36 | <littledan> |
|
13:37 | <littledan> | I'm not sure whether the resolve context change would address this; my initial intuition is that it wouldn't |
13:38 | <littledan> | but maybe the context would be propagated properly through the chain of rejections? |
14:19 | <Andreu Botella> | but maybe the context would be propagated properly through the chain of rejections? |
14:19 | <Andreu Botella> | with set I'm not sure |
14:40 | <littledan> | with the current semantics of AsyncContext, the outer promise is the one that's the unhandled rejection, and that's outside of the .run calls which might be deeper in the stack |
14:41 | <littledan> | an alternative would be to store a snapshot when an Error is constructed or first thrown, and then restore that snapshot later, for example, just like how stack traces work |
15:41 | <Chengzhong Wu> | 20m to the call today, please feel free to add your topics at https://docs.google.com/document/d/1pi-NMbqVhg2UuxQAZ4jOGDeHLlZGD_DJ7fyxHt_C2hs/edit |
20:55 | <littledan> | Some TODOs I took from the meeting today:
|
22:26 | <Justin Ridgewell> | Compare with other languages like Ruby with open-source APMs that adopt flow-through semantics Collected a few languages: https://github.com/nodejs/node/issues/53037#issuecomment-2136202299 |
22:41 | <Justin Ridgewell> | (Still catching up with everything in this channel over the holiday weekend) |
22:48 | <Justin Ridgewell> | but it's looking like with the current spec, .then() time, no? Are you expecting someAsyncApi ’s rejection time? |
22:49 | <Andreu Botella> | that was indeed my expectation |