def _handle_error(self, e, code):
    if (isinstance(e.cause, compat_HTTPError) and (e.cause.code == code)):
        error = self._parse_json(e.cause.read(), None)
        if (error.get('error') == 'required_registered'):
            self.raise_login_required()
        raise ExtractorError(error['error_description'], expected=True)
    raise
def _handle_error(self, e, code):
    if (isinstance(e.cause, compat_HTTPError) and (e.cause.code == code)):
        error = self._parse_json(e.cause.read(), None)
        if (error.get('error') == 'required_registered'):
            self.raise_login_required()
        raise ExtractorError(error['error_description'], expected=True)
    raise