Having trouble with node detect call api axios error? Any solutions or tips?

11 Replies, 1405 Views

Hey, I ran into this node detect call api axios error too. One thing to check is if your API is timing out. Axios has a default timeout, so if the API is slow, it might be failing silently. Try setting a custom timeout like this:

```javascript
axios.get('your-api-endpoint', { timeout: 5000 })
.then(response => console.log(response.data))
.catch(err => console.error('Timeout or other error:', err));
```

Also, Postman is a great tool to test your API independently and see if the issue is on the client or server side.

Messages In This Thread



Users browsing this thread: 1 Guest(s)