If you are trying to integrate an API that is not properly configured to handle CORS requests, trying to test it simply gives "Failed to fetch" error. Give proper error with guidance on how to resolve it.