def _parse_op(res_dict):
    if (res_dict['op'] == REQNACK):
        raise RequestNackedException('ReqNack of id {}. Reason: {}'.format(req['reqId'], res_dict['reason']))
    if (res_dict['op'] == REJECT):
        raise RequestRejectedException('Reject of id {}. Reason: {}'.format(req['reqId'], res_dict['reason']))
def _parse_op(res_dict):
    if (res_dict['op'] == REQNACK):
        raise RequestNackedException('ReqNack of id {}. Reason: {}'.format(req['reqId'], res_dict['reason']))
    if (res_dict['op'] == REJECT):
        raise RequestRejectedException('Reject of id {}. Reason: {}'.format(req['reqId'], res_dict['reason']))