-
-
Notifications
You must be signed in to change notification settings - Fork 531
SyntaxError: Unexpected end of JSON input #1284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#1280 is unrelated and is on the typegen side; that won’t affect a runtime error like what you’re seeing. So I’m assuming that your API does NOT return a |
It should also be noted that we respect the |
We have this issue in two areas w/ the new version. The issue is this is happening for responses from two different very popular public API's; so we have no control over the implementation :( |
I have a 202 response with |
got the same error:
|
Get the same error on last version for PATCH method with empty body So if I send body: {} its works fine, but i have red line under because generated API not expected. (Response return 204) |
Another way to fix it add @ApiBody({ schema: {} }) and send body: {}. But I m not sure that its correct way. |
I faced with this issue when API server returns a response with status |
Hi, I am also experiencing this issue with a response status
We looked at this as a solution to the problem, but unfortunately it will not work as our backend API is incapable of doing this without significant memory increases.
So this means that adding the header is effectively removed by SpringBoot. |
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem. |
Looks like #1280 might fix this when merged.
Description
With the update to
0.7.1
from0.6.0
, errors began to throw withSyntaxError: Unexpected end of JSON input
when a record from the API returned null/undefined.A brief description of the bug. Provide either a screenshot or the full error message
Reproduction
How can this be reproduced / when did the error occur? Does the issue occur in a specific browser, or all browsers?
Expected result
Expect null/undefined rather than failing to parse json
(in case it’s not obvious)
Checklist
The text was updated successfully, but these errors were encountered: