eclipse-cdt-cloud / tsp-typescript-client

Client-side implementation, in typescript, of the Trace Server Protocol (TSP)
MIT License
9 stars 20 forks source link

Responses with no body cause uncaught exception #6

Closed bhufmann closed 3 years ago

bhufmann commented 4 years ago

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.

PatrickTasse commented 3 years ago

Fixed with https://github.com/theia-ide/tsp-typescript-client/pull/15