a fetch error only happens from a network or CORS error. you don't show the fetch code, so the error could be from after the fetch. for example:
fetch('http://example.com/movies.json')
.then(response => response.json())
.then(data => console.log(data));
will throw an error if the response is not json (say a 500 error returning html). try:
fetch('http://example.com/movies.json')
.then(response => {
if (!response.ok) throw (`invalid response: ${response.status}`);
return response.json()
})
.then(data => console.log(data));