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
When an ApiApp instance calls an API endpoint (of another app), and that endpoint returns something that cannot be JSON-serialized (like undefined), an exception is thrown by ApiApp (Error: invalid json response body at Remote Process).
It's not documented anywhere that API endpoints should return data that's JSON-serializable.
The text was updated successfully, but these errors were encountered:
Do I understand correctly this error happens in the app that performs the call (client), not the one providing the data (server)?
In that case I think we should also print a warning when an api returns data that doesn't json serialize, so the developer of the app in question can spot, and fix, it more easily.
So actually the issue was that we internally turn undefined into a 204 No Content response but the client tried to parse that as JSON. I added a check so that a 204 status code gets turned back into undefined as expected. I'm going to take a look at the documentation and see if we can explain this behaviour clearer.
When an ApiApp instance calls an API endpoint (of another app), and that endpoint returns something that cannot be JSON-serialized (like
undefined
), an exception is thrown by ApiApp (Error: invalid json response body at Remote Process
).It's not documented anywhere that API endpoints should return data that's JSON-serializable.
The text was updated successfully, but these errors were encountered: