Fixing status code handling in `client.request()`