samuelpilz / core-catcher

MIT License
3 stars 0 forks source link

Error handling if incorrect json sent between server and client #26

Closed samuelpilz closed 7 years ago

samuelpilz commented 7 years ago

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

fendor commented 7 years ago

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

samuelpilz commented 7 years ago

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

fendor commented 7 years ago

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.

samuelpilz commented 7 years ago

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.

fendor commented 7 years ago

We can create an issue for this ;)

You are right, it is probably not our concern.

samuelpilz commented 7 years ago

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

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