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
{{ message }}
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.
Our client-side code mirrors a number of aspects of the server code.
One instance of this is in our message handler's when we 'check the message type/name' and 'check that the client is in the right state'. These two checks should be separated since if one of them fails, the client gets a generic error message which makes it hard to decipher whether an incorrect message was received or if its in the wrong state.
To fix this, we should first check the message, and then in each specific message handler, check the state before doing anything. If it is in the wrong state, we should throw a 'state' error as opposed to a generic error.
The text was updated successfully, but these errors were encountered:
Our client-side code mirrors a number of aspects of the server code.
One instance of this is in our message handler's when we 'check the message type/name' and 'check that the client is in the right state'. These two checks should be separated since if one of them fails, the client gets a generic error message which makes it hard to decipher whether an incorrect message was received or if its in the wrong state.
To fix this, we should first check the message, and then in each specific message handler, check the state before doing anything. If it is in the wrong state, we should throw a 'state' error as opposed to a generic error.
The text was updated successfully, but these errors were encountered: