Return an Object in Promise with multiple values

I'm trying to return an object with an array of object from another query but I get the error:

getUsersGroups: Failed to execute 'postMessage' on 'Window': # could not be cloned.

I don't think there is anything wrong with the syntax - is this a Retool limitation?

const promises = users.map((user) => {
  return {
    user: user.id,
    groups: getUserGroups.trigger({
      additionalScope: {
        userId: user.id,
      },
    }),
  };
});

return Promise.all(promises); 

I managed to fix this myself by using the C-Promise2 package. I imported the minified library using unpkg then used the CPromise to return what i needed.

https://unpkg.com/c-promise2@0.13.12/dist/c-promise.umd.min.js

const groups = CPromise.allSettled(users, {
    mapper: (user) => {
      return getUserGroups.trigger({
        additionalScope: {
          userId: user.id,
        },
      });
    },
    concurrency: concurrencyLimit,
  }).then((results) => {
    return results.map((result, index) => ({user: users[index].id, groups: result}));
  });