Hello ! I’m getting a regular error when updating ...
# community-help
m
Hello ! I’m getting a regular error when updating a lot of documents in prod ‘Unexpected end of JSON input’ I added som logs by patching the node sdk and it seems like the server is returning an empty string instead of the result. I’m using typesense cloud with version 27. Is that a known issue does it mean that my records where not updated properly ?
k
We have had some people report this before but we have never been able to reliably reproduce it. Are you able to reproduce the issue consistently? The records are updated properly, this seems like an issue with streaming the response.
m
I am not able to reproduce consistently but it only happens when doing an import with action update. I will try to see if I can find one of the offending call to trigger it consistently
k
Yes, please if you are able to do that and can setup a sample collection and data that triggers it, it will help us a lot in figuring it out.
m
Just checked my logs again and it seems it’s actually a simple thing and probably not a real bug in my case, it always happen when running
Copy code
index.documents().import([], {
        action: 'update',
 })
because of a bug in my code I didn’t check if the array was empty before sending the request and this results in the Json parse error. I think a more descriptive error would be good to add either in the sdk of api directly
👍 1