async function apiCall (data:FormData) {
return (await fetch ("/api/apiOperations", {
method: 'POST',
body: data
}))
}```
Gives me the error
```⨯ unhandledRejection: TypeError: Failed to parse URL from /api/apiOperations
at node:internal/deps/undici/undici:12502:13 {
[cause]: TypeError: Invalid URL
[...]
at async apiCall (webpack-internal:///(ssr)/./app/apiAccess.tsx:105:12)```
but the API still triggers and returns data as expected. What's causing the random error message?
#Failed to parse URL, but API still gets called and responds?
4 messages · Page 1 of 1 (latest)