When the socket state is set to error, an error message should be stored with the session.
When the socket state is set to error, an error message should be stored with the session.