Help

Scripting: fetch breaks the app execution

509 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Dmitry_Mosquid
4 - Data Explorer
4 - Data Explorer

I’m having a problem using fetch with the scripting app.
My code looks like this:

records.forEach(async (record) => {
  try {
    // works until here
    const response  = await fetch(...)      
   // never gets here either
  } catch (err) {
   // never gets here either
  }
} )

It seems like there’s something going on with fetch that breaks further execution and I’m unable to debug it.

1 Reply 1
Dmitry_Mosquid
4 - Data Explorer
4 - Data Explorer

If anyone else will encounter this issue, getting rid of forEach in favor of for of solved this issue for me