Hola como se puede dar cuenta de error 404 en axios? Aquí está mi código
const WeatherFunc = async (city) => { const { data } = await axios.get(url, { params: { q: city, units: 'metric', APPID: apikey, } }); return data; }Verifique el estado de la respuesta en la promesa de axios
axios.get(url, { //... }).then(response => { if (response.status === 404) { // handle your 404 } // ... }).catch(error => { // handle server error.. })