You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the tsp-typescript-client tries to convert to json any response they get from the server. But some of the error messages, like when putting an invalid trace, return as text strings.
This causes like this in the theia-trace-extension:
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
openTrace tsp-client.ts:55
tryOpen trace-manager.ts:76
We should either:
1- Document all error messages to be json, like {message: string} in the protocol and have the server return them this way
or
2- Have the tsp-typescript-client verify the response code before trying to convert to json and have the consumers do likewise whe processing responses
What do you think?
The text was updated successfully, but these errors were encountered:
Related pull request in tsp-typescript-client: eclipse-cdt-cloud/tsp-typescript-client#15.
With that change it's OK not to have a json model in the response, and the plain text response will be available to the caller.
the tsp-typescript-client tries to convert to json any response they get from the server. But some of the error messages, like when putting an invalid trace, return as text strings.
This causes like this in the theia-trace-extension:
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
openTrace tsp-client.ts:55
tryOpen trace-manager.ts:76
We should either:
1- Document all error messages to be json, like {message: string} in the protocol and have the server return them this way
or
2- Have the tsp-typescript-client verify the response code before trying to convert to json and have the consumers do likewise whe processing responses
What do you think?
The text was updated successfully, but these errors were encountered: