I've been stealing some of the internal design of Promises for Mojolicious, and noticed that rejections are not propagated through the promise chain. It looks like this line should be $d->$method(@results); instead of $d->resolve(@results);.
You can test this by chaining multiple ->catch(sub {...}) calls. Propagating rejections is a requirement of Promises/A+.
I've been stealing some of the internal design of
Promises
forMojolicious
, and noticed that rejections are not propagated through the promise chain. It looks like this line should be$d->$method(@results);
instead of$d->resolve(@results);
.You can test this by chaining multiple
->catch(sub {...})
calls. Propagating rejections is a requirement of Promises/A+.