Sort require statements alphabetically
Write ErrorResponse class

When notifications cannot be delivered or other errors occur, the connection
sends back some data to help identify the problem. The ErrorResponse class
decodes the data and gives us access to the status and identifier of the
notification related to the error.
Check for error responses and call the handler

When we get a response on the socket, parse the error response and call the
handler if one has been set.