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

11 Replies, 1128 Views

Hey! I had the same issue with node detect call api axios error a while back. Turns out, I wasn’t properly handling the error object in the catch block. Make sure you’re logging the full error object like this:

```javascript
.catch(err => {
console.error('Error:', err.response ? err.response.data : err.message);
});
```

This helped me see the actual response from the API, which was super useful. Also, check if the API is returning a non-200 status code—sometimes that’s the culprit.

Messages In This Thread



Users browsing this thread: 1 Guest(s)