def exception_handler_v20(status_code, error_content):
error_dict = None<EOL>request_ids = error_content.request_ids<EOL>if isinstance(error_content, dict):<EOL><INDENT>error_dict = error_content.get('<STR_LIT>')<EOL><DEDENT>client_exc = None<EOL>if error_dict:<EOL><INDENT>try:<EOL><INDENT>error_type = error_dict['<STR_LIT:type>']<EOL>error_message = error_dict['<STR_LIT:message>']<EOL>if error_dict['<STR_LIT>']:<EOL><INDENT>error_message += "<STR_LIT:\n>" + error_dict['<STR_LIT>']<EOL><DEDENT>client_exc = getattr(exceptions, '<STR_LIT>' % error_type, None)<EOL><DEDENT>except Exception:<EOL><INDENT>error_message = "<STR_LIT:%s>" % error_dict<EOL><DEDENT><DEDENT>else:<EOL><INDENT>error_message = None<EOL>if isinstance(error_content, dict):<EOL><INDENT>error_message = error_content.get('<STR_LIT:message>')<EOL><DEDENT>if not error_message:<EOL><INDENT>error_message = "<STR_LIT>" % (status_code, error_content)<EOL><DEDENT><DEDENT>if not client_exc:<EOL><INDENT>client_exc = exceptions.HTTP_EXCEPTION_MAP.get(status_code)<EOL><DEDENT>if not client_exc:<EOL><INDENT>client_exc = exceptions.NeutronClientException<EOL><DEDENT>raise client_exc(message=error_message,<EOL>status_code=status_code,<EOL>request_ids=request_ids)<EOL>
Exception handler for API v2.0 client.

    This routine generates the appropriate Neutron exception according to
    the contents of the response body.

    :param status_code: HTTP error status code
    :param error_content: deserialized body of error response