API Update SyntaxError

I intermittently get the error: “SyntaxError: Unexpected token R in JSON at position 0” when posting an update to a record. I Use knackhq client via Node JS.
The data in the post is definitely JSON format, and no “R” in the post. Can anyone help with insight to this error?

Hi Pieter. The error ‘Unexpected token R in JSON at position 0’ is usually caused by trying to invoke the JSON method on a non-JSON response, for example response.json(). It’s referring to the data in the response, not the request. So even though your post or put is JSON format, the response is not. Try logging the response to the console and looking at it e.g. console.log(response)

Hope this helps!