Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79562

Async function passed to funWithArgs is not executed properly

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2023-08-07

    Description

      Passing the following function to funWithArgs will not propagate the internal error:

      import { funWithArgs } from "jstests/libs/parallel_shell_helpers.js";
       
      const test = true;
      const awaitShell = startParallelShell(funWithArgs(async function(test) {
          throw new Error("intentionally thrown")
      }, test), undefined, true);
       
      awaitShell();
      

      Attachments

        Activity

          People

            matt.broadstone@mongodb.com Matt Broadstone
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: