def _raise_contrail_error(self, status_code, info, obj_name):
        if status_code == requests.codes.bad_request:
            raise ContrailBadRequestError(
                msg=info['message'], resource=obj_name)
        error_class = CONTRAIL_EXCEPTION_MAP[status_code]
        raise error_class(msg=info['message'])