Skip to content

Commit

Permalink
Merge pull request #132 from chromaui/matt/ap-3753-storybook-server-c…
Browse files Browse the repository at this point in the history
…rashes-if-there-was-an-error-running-the

Handle unexpected errors from the runChromaticBuild method (cli misconfigured, missing build commmand, etc)
  • Loading branch information
Matthew Weeks authored Oct 13, 2023
2 parents 36a34bc + add3522 commit 91e37df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ async function serverChannel(

channel.on(START_BUILD, async () => {
const { projectToken } = projectInfoState.value || {};
await runChromaticBuild(localBuildProgress, { projectToken });
try {
await runChromaticBuild(localBuildProgress, { projectToken });
} catch (e) {
console.error(`Failed to run Chromatic build, with error:\n${e}`);
}
});

channel.on(STOP_BUILD, stopChromaticBuild);
Expand Down

0 comments on commit 91e37df

Please sign in to comment.