stealthOriginal post
Rank 1: Thread
async function getData() {
const url = "https://6798f32eae97aea2944b.appwrite.global/";
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(Response status: ${response.status});
}
const json = await response.json();
console.log(json);
} catch (error) {
console.error(error.message);
}
}
getData();
gives me the error attached in photo
Summary
Developers are encountering a CORS error in their function. The solution provided involves updating the function response to include a status code and headers. Additionally, the error message attached in a photo is mentioned.