The code returns the following error:
[v0] Agmarknet API error: TypeError: fetch failed
at async GET (app/api/mandi-prices/route.ts:67:22)
65 | }
66 |
> 67 | const response = await fetch(`${AGMARKNET_API_BASE}?${params.toString()}`, {
| ^
68 | next: { revalidate: 3600 }, // Cache for 1 hour
69 | })
70 | {
[cause]: Error: read ECONNRESET
at ignore-listed frames {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
}
Revise the code to address the error.