Hi guys, I'm requesting my API in my setup, and i want to redirect to a page and stop the rest of the setup when it returns me an error.
I'm using navigateTo, it's working but the console shows me errors of undefined properties on the variable i set with my API response
const { data } = await useFetch('......', { onResponse: ({response}) => { if (! response.ok) { return navigateTo(.....) } }});const myVar = ref(data.value.myVar); // this one throw me an error
const { data } = await useFetch('......', { onResponse: ({response}) => { if (! response.ok) { return navigateTo(.....) } }});const myVar = ref(data.value.myVar); // this one throw me an error