dan1234
useFetch error payload is missing fields.
I have an expressjs backend api route returning error like
res.stats(500).json({message: 'Unable to locate resource', redirectUrl: 'http://google.com'})
in NUXT3 page, I call this api as
const { data: response, error } = await useFetch<any>('/api/v2/validate/', {
method: 'POST',
body: { code: code },
});
The error.value.data contains message field but not redirectUrl. What could be the reason for that?
5 replies