I was trying to retrieve data from an API and it worked for several days but now, it gives this error:
[Error] Preflight response is not successful
[Error] Fetch API cannot load https://imdb-api.com/en/API/Search/my_key/m due to access control checks.
[Error] Failed to load resource: Preflight response is not successful (m, line 0)
What does this mean?
By the way, here's the code(relatively simple):
export async function getAPI(url, settings, callback) {
try {
const response = await fetch(url, settings)
var result = await response.json()
callback(result)
} catch {
callback({errorMessage: "This is an error message"})
}
}
Does it have something to do with the code or something else?
Thanks a lot in advance :)