Getting the error:
'Fetch error:' TypeError: (0 , api_out.default) is not a function
I can’t seem to trace it. Using the fetch method from @forge/api. I applied a normal get
action.
async function fetchData(url) {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error('Network response was not ok');
}
const data = await response.json();
console.log('Data:', data);
return data
} catch (error) {
console.error('Fetch error:', error);
}
}
Help!