@staticmethod<EOL><INDENT>def _check_error(response):<DEDENT>
if '<STR_LIT:error>' in response:<EOL><INDENT>raise InfluxDBError(response['<STR_LIT:error>'])<EOL><DEDENT>elif '<STR_LIT>' in response:<EOL><INDENT>for statement in response['<STR_LIT>']:<EOL><INDENT>if '<STR_LIT:error>' in statement:<EOL><INDENT>msg = '<STR_LIT>'<EOL>raise InfluxDBError(msg.format(d=statement))<EOL><DEDENT><DEDENT><DEDENT>
Checks for JSON error messages and raises Python exception