Skip to content

Commit

Permalink
Add context to sentinel upload failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhobbs committed Oct 10, 2024
1 parent 6890d08 commit a2aebcb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion node-src/tasks/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,15 @@ export const waitForSentinels = async (ctx: Context, task: Task) => {
})
);

await Promise.all(Object.values(sentinels).map((sentinel) => waitForSentinel(ctx, sentinel)));
try {
await Promise.all(Object.values(sentinels).map((sentinel) => waitForSentinel(ctx, sentinel)));
} catch (err) {
throw new Error(
`Failed to finalize upload. Please check https://status.chromatic.com/ or contact support.
${err.message}`
);
}
};

export default createTask({
Expand Down

0 comments on commit a2aebcb

Please sign in to comment.