0

I'm rather stuck with getting images using Axios from AWS. I'm receiving an error that I'm unfamiliar with:

enter image description here

I have hosted the image here: https://do-not-delete-ct-images.s3.us-west-2.amazonaws.com/1024-2.png with the rules set to publicly available for read only.

And this is the code I'm using:

axios.get("https://do-not-delete-ct-images.s3.us-west-2.amazonaws.com/1024-2.png").then(response=>{
    console.log("get data: ", response.data);
}).catch(err =>{
    console.log("get data err: ", err);
})

Thanks in advance and apologies if this is an unwise mistake.

  • Where is your code running? In the browser or somewhere else? Also, you're logging the entire error object which makes it hard to read. See [Handling Errors](https://axios-http.com/docs/handling_errors) for some better options – Phil Feb 22 '22 at 22:54

0 Answers0