Guzzle response object has methods that should be shown by PhpStorm, in this case, it would be getStatusCode(). But any 4xx and 5xx code automatically throws an exception already. That should be catched and re-formatted, but this works.