Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1506

Getting axios error "ERR_NETWORK" when fetching data using AWS lambda function url in a react app

$
0
0

I am making a get request in "create react app" as shown below through an AWS lambda function url, but I am getting the error shown in picture below. When I do the same exact request in postman or in web browser I don't get any error. I am allowing cors in my lambda function. Does anyone know the cause of the error?

THE CODE:

function searchStock() {        fetchStock().then(resp=> {            console.log(resp)        }).catch(err=> console.log(err))    }    async function fetchStock() {        let res = await axios.get("AWS lambda function url");        return res;    }

THE ERROR:enter image description here


Viewing all articles
Browse latest Browse all 1506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>