def check_response(self, resp):
if resp.status_code == <NUM_LIT>:<EOL><INDENT>raise ApiException(json.loads(resp.content).get('<STR_LIT:message>'))<EOL><DEDENT>return resp<EOL>
raise a descriptive exception on a "bad request" response