Skip to content

Commit 34d02eb

Browse files
committed
fix(plugins): preserve install failure cause
Co-authored-by: Tak Hoffman <[email protected]> Worked on by: - @Takhoffman
1 parent c5651df commit 34d02eb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/plugins/management-service.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,12 +1390,12 @@ async function persistManagedSourceInstall(params: {
13901390
await params.transaction?.rollback();
13911391
} catch (rollbackError) {
13921392
// Both errors are retained; the install failure remains the primary cause.
1393-
// oxlint-disable-next-line preserve-caught-error -- AggregateError.errors preserves the rollback error.
1394-
throw new AggregateError(
1393+
const aggregate = new AggregateError(
13951394
[error, rollbackError],
13961395
"Plugin install failed and payload rollback failed",
1397-
{ cause: error },
13981396
);
1397+
aggregate.cause = error;
1398+
throw aggregate;
13991399
}
14001400
}
14011401
throw error;

0 commit comments

Comments
 (0)