I was getting some "Could not connect to server" when there was a proper json payload with an `error` key, the change here makes sure to prioritize those messages over the generic one.