def _client_error_status(ex):
    """Get the HTTP status for the given ClientError"""
    resp = ex.response
    return resp.get('Error', {}).get('HTTPStatusCode') or resp.get(
        'ResponseMetadata', {}).get('HTTPStatusCode')
