Failing fetch when server respond with 200

Hello,
I’m trying to replicate an app already built on GoogleAppScripts into Airtable.
The problem I’m facing is with the fetch call.

Fetch call

const availability = await fetch('https://url', {
        method: 'POST',
        body: JSON.stringify({productId: productId})
    }).then(res => { 
        const result = res.json();
        output.text(`Result ${result}`);
        return result;
    }).catch((error) => {
        output.text(`Error ${error}`);
    });

The API runs on firebase function and the response is 200

Function execution took 10175 ms. Finished with status code: 200 

So help us understand…

  1. Where is the above code running? Airtable script block? Airtable custom app? Airtable automation script?
  2. It is calling a Firebase Cloud Function?
  3. The response is 200OK and without providing any of the cloud function source you want to know why it is failing despite returning 200OK?
  4. You’re trying to run code from Google Apps Script in Airtable? This is not typically possible without significant changes.
1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.