client: Exit after server error

If server return an error response, exit the client instead of trying to
reconnecting. Usually these errors means client sent a bad request.