def METHOD_NAME(self):
    if self.status == httplib.UNAUTHORIZED:
        body = self.parse_body()
        raise InvalidCredsError(body["message"])
    else:
        body = self.parse_body()
        if "message" in body:
            error = "{} (code: {})".format(body["message"], self.status)
        else:
            error = body
        return error