samuelpilz / core-catcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error handling if incorrect json sent between server and client

samuelpilz opened this issue · comments

How to handle the case that the json sent between server and client cannot be parsed in one of the sides?

Log the error.
An alternative is, that the client somehow notifies the server. But I think, there is only so much one can do

"Log" in a sense that user sees something or only as a js-log?

Both is possible, if we want the user to file a bug report, then yes, display the message including a link to the issue page.
It would also be possible to publish the error message to hastebin and the user should attach this link in our issue tracker.

But the other way would work well for now.

The auto-reporting is a nice idea :)

But will most likely not be used since the protocol can easily be synced. The question is how to deal with the parsed Maybe.

We can create an issue for this ;)

You are right, it is probably not our concern.

We assume that the protocol-modules are always synced perfectly :)

Then, we just ignore the Nothing part of the maybe after parsing