Error: Failed to execute 'postMessage' on 'Window'

Hey, I'm currently getting a weird error and I cant find out whats causing it

{"stack":"Error: Failed to execute 'postMessage' on 'Window': function(...t){let n;try{n=e(...t)}catch(e){return}return n instanceof Promise?new Promise((e=>{n.then(e).catch((()=>e()))})):n} could not be cloned.\n at Ac.of [as postMessage] (\n at (\n at Object.runNetworkQuery (\n at eval (\n at Object.withQueryRunContext (\n at y ("}

I have a simple javascript query that gets information from selected rows of a table and creates an array of objects for each of the rows.

After doing so, I'm passing it down to a REST-API function which gets called but then leads to this error.

const datesToSync = => {

const { date_id, activity_id, start, end, ...other fields } = date
  return {
      id: date_id,
      ... other fields
      group: {
        id: activity_id,
        ... other fields

  additionalScope: {
  onSuccess: function (data) {
  onFailure: function (error) {

The body in the post_classes function looks like this

  classes: {{ datesToSync }}

Both start and end are strings (as I read in the forum that moment() sometimes makes problems)

Appreciate your help, thanks!

If you send datesToSync to the console (comment out the rest of your code or in a testing block), what does it show? Just thinking to check the input before anything else...