firebase_admin/_utils.py
def _parse_platform_error(content, status_code):
    """Parses an HTTP error response from a Google Cloud Platform API and extracts the error code
    and message fields.

    Args:
        content: Decoded content of the response body.
        status_code: HTTP status code.

    Returns:
        tuple: A tuple containing error code and message.
    """
    data = {}
    try:
        parsed_body = json.loads(content)
        if isinstance(parsed_body, dict):
            data = parsed_body
    except ValueError:
        pass

    error_dict = data.get('error', {})
    msg = error_dict.get('message')
    if not msg:
        msg = 'Unexpected HTTP response with status: {0}; body: {1}'.format(status_code, content)
    return error_dict, msg
Parses an HTTP error response from a Google Cloud Platform API and extracts the error code
    and message fields.

    Args:
        content: Decoded content of the response body.
        status_code: HTTP status code.

    Returns:
        tuple: A tuple containing error code and message.
    
Parses an HTTP error response from a Google Cloud Platform API and extracts the error code
and message fields.
Parses an HTTP error response from a Google Cloud Platform API and extracts the error code and message fields .
def _parse_platform_error(content, status_code):
    data = {}
    try:
        parsed_body = json.loads(content)
        if isinstance(parsed_body, dict):
            data = parsed_body
    except ValueError:
        pass
    error_dict = data.get('error', {})
    msg = error_dict.get('message')
    if not msg:
        msg = 'Unexpected HTTP response with status: {0}; body: {1}'.format(status_code, content)
    return error_dict, msg
def _parse_platform_error ( content , status_code ) : data = { } try : parsed_body = json . loads ( content ) if isinstance ( parsed_body , dict ) : data = parsed_body except ValueError : pass error_dict = data . get ( 'error' , { } ) msg = error_dict . get ( 'message' ) if not msg : msg = 'Unexpected HTTP response with status: {0}; body: {1}' . format ( status_code , content ) return error_dict , msg
Parses an HTTP error response from a Google Cloud Platform API and extracts the error code
and message fields.
Parses an HTTP error response from a Google Cloud Platform API and extracts the error code and message fields .
"""Parses an HTTP error response from a Google Cloud Platform API and extracts the error code
    and message fields.

    Args:
        content: Decoded content of the response body.
        status_code: HTTP status code.

    Returns:
        tuple: A tuple containing error code and message.
    """
A tuple containing error code and message.
A tuple containing error code and message .
tuple
content
Decoded content of the response body.
Decoded content of the response body .
status_code
HTTP status code.
HTTP status code .