Thank you for taking the time to contribute to this project! Please take the time to tell us a bit about the changes you've made.
Description
Give a short and brief description of the pull request. Add a screenshot if appropriate and helpful. Changes can be listed in the next section.
Updates the server message payloads to include a type and wrap the content in a content object. Updates the client to handle these new message formats, as well as the error messages sent by the server.
Closes #46.
Changes
List the changes made.
Updated all server messages to include a "type" string
Updated all server messages with a "content" object
Updated client to handle new message format
Updated client to log server error messages to console
Updated client to handle SyntaxError for JSON.parse on the onmessage handler
Breaking Change?
Will these changes cause existing functionality to not work as expected? Will contributors be able to run the project after these changes are merged, without needing to take any additional steps?
[x] Please tick if this is a breaking change and describe why below
Client-server communication protocol update.
Changes were made to the contents and structure of messages sent by the server. This PR updates the client accordingly. After merging this PR, no further action is needed to address the breaking change.
Merging Checklist
Lastly, before merging we need to make sure that these are done.
Pull Request Submission
Thank you for taking the time to contribute to this project! Please take the time to tell us a bit about the changes you've made.
Description
Updates the server message payloads to include a
type
and wrap the content in acontent
object. Updates the client to handle these new message formats, as well as the error messages sent by the server.Closes #46.
Changes
SyntaxError
forJSON.parse
on theonmessage
handlerBreaking Change?
Client-server communication protocol update.
Changes were made to the contents and structure of messages sent by the server. This PR updates the client accordingly. After merging this PR, no further action is needed to address the breaking change.
Merging Checklist
All tests are up-to-dateN/AAll tests passN/A