client now checks for HTTP errors