message: Handle nonexistent sourceDir.
diff: @@ -34,6 +34,7 @@ const TesterGetUploadUrlsMutation = `
  // We don't want the paths to include rootDir -- so if rootDir = storybook-static,
  // paths will be like iframe.html rather than storybook-static/iframe.html
  function getPathsInDir(rootDir, dirname = '.') {
  + try {
  return readdirSync(join(rootDir, dirname))
  .map(p => join(dirname, p))
  .map(pathname => {
  @@ -44,6 +45,9 @@ function getPathsInDir(rootDir, dirname = '.') {
  return [{ pathname, contentLength: stats.size }];
  })
  .reduce((a, b) => [...a, ...b], []); // flatten
  + } catch (e) {
  + throw new Error(invalid({ sourceDir: rootDir }).output);
  + }
  }
  export const uploadStorybook = async (ctx, task) => {
  