Skip to content
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

Responses with no body cause uncaught exception #6

Closed
bhufmann opened this issue Oct 16, 2020 · 1 comment
Closed

Responses with no body cause uncaught exception #6

bhufmann opened this issue Oct 16, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@bhufmann
Copy link
Collaborator

bhufmann commented Oct 16, 2020

If a server returns a request with no body, the call to response.json() will cause an uncaught exception: "Uncaught SyntaxError: Unexpected end of JSON input".

The line const json = await response.json() as T; in method performRequest() of rest-client.ts causes the exception.

@bhufmann bhufmann added the bug Something isn't working label Oct 16, 2020
@PatrickTasse
Copy link
Contributor

Fixed with #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants