@staticmethod<EOL><INDENT>def from_response(raw_response):<DEDENT>
json_response = raw_response.json()<EOL>error_info = json_response["<STR_LIT:error>"]<EOL>code = error_info["<STR_LIT:code>"]<EOL>try:<EOL><INDENT>error_cls = _error_map[code]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise NotImplementedError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(code)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>return error_cls(raw_response, **error_info)<EOL><DEDENT>
The Yelp Fusion API returns error messages with a json body
        like:
        {
            'error': {
                'code': 'ALL_CAPS_CODE',
                'description': 'Human readable description.'
            }
        }

        Some errors may have additional fields. For example, a
        validation error:
        {
            'error': {
                'code': 'VALIDATION_ERROR',
                'description': "'en_USS' does not match '^[a-z]{2,3}_[A-Z]{2}$'",
                'field': 'locale',
                'instance': 'en_USS'
            }
        }