Skip to content

Commit

Permalink
fix(vat-http): use Promise.allSettled semantics to tolerate errors
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 8, 2019
1 parent aff7e87 commit 6f9aa68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ag-solo/vats/vat-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ function build(E, D) {
handler.pleaseProvisionMany = obj => {
const { applies } = obj;
return Promise.all(applies.map(args =>
E(provisioner).pleaseProvision(...args)));
// Emulate allSettled.
E(provisioner).pleaseProvision(...args).then(
value => ({status: 'fulfilled', value}),
reason => ({status: 'rejected', reason}))));
};
}
},
Expand Down

0 comments on commit 6f9aa68

Please sign in to comment.