Error from Typebot server: SyntaxError: Unexpected end of JSON input
When I'm trying to integrate my API that returns me an 204 not content Typebot response with this error.
Note This error is happening after update to latest version of Typebot
3 Replies
Can you provide a way for me to reproduce the bug?
Hi mate, sorry for my dealy in answer your question.
I was getting this issue when:
1. Add a HTTP request block in your typebot
2. Add an API call to an endpoint that response with 204, meaning not giving you an body json response.
3. This triggered the issue I was getting previously.
Note: I think typebot is specting always an body json response, however 204 returns empty and trigger this issue, I solve by my own responding with 202 instead of 204, but that correct response from my API should be 204 🙂
References
https://httpwg.org/specs/rfc7231.html#status.204
IETF HTTP Working Group Specifications
RFC7231
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
I just tried a simple HTTP endpoint that returns status 204, it worked fine on my end 🤔
Maybe it was fixed on a recent comment, what's your Typebot instance version?