-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
Node : v16.14.2
ofetch: "^1.3.2",
Reproduction
try {
await $fetch("/contact", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
baseURL: runtimeConfig.public.apiUrl,
body: form.value,
});
} catch (error) {
if (!(error instanceof FetchError)) throw error;
if (error.statusCode !== 422) throw error;
// ^Property 'statusCode' does not exist on type 'FetchError<any>'.ts(2339)
errors.value = error.data.errors;
// ^Property 'data' does not exist on type 'FetchError<any>'.ts(2339)
}
Describe the bug
After upgrading to version 1.3.2, the following error message appears. I can confirm that the error message does not appear in version 1.3.1.
Additional context
No response
Logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working