Nuxtjs3 project issue
Budget: $15 – $25 USD
When we're calling a fake API like https://jsonplaceholder.typicode.com/posts from our Nuxt 3 project using node-fetch, it's working fine. But when we're calling our real API (https://api.lenouvelliste.com/api/article-detail/241003), it failing with 500 error. Here are few error logs that might help.
[fetch response error] https://api.lenouvelliste.com/api/article-detail/241003 500 ReadableStream { locked: true, state: 'closed', supportsBYOB: false }
[nuxt] [request error] [unhandled] [500] Unexpected token < in JSON at position 0 09:39:48
at JSON.parse (<anonymous>)
at parseJSONFromBytes (node:internal/deps/undici/undici:6498:19)
at successSteps (node:internal/deps/undici/undici:6472:27)
at node:internal/deps/undici/undici:1145:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:204:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[fetch response error] https://api.lenouvelliste.com/api/article-detail/241003 500 ReadableStream { locked: true, state: 'closed', supportsBYOB: false }
[nuxt] [request error] [unhandled] [500] Unexpected token < in JSON at position 0 09:39:48
at JSON.parse (<anonymous>)
at parseJSONFromBytes (node:internal/deps/undici/undici:6498:19)
at successSteps (node:internal/deps/undici/undici:6472:27)
at node:internal/deps/undici/undici:1145:60
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:204:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)