Handling error state from server, erroneously sending the error state