jonhcw

Suppressing callback error replies

Discussion created by jonhcw on Dec 20, 2012
Latest reply on Dec 21, 2012 by jonhcw

Hi,

 

I'm creating a sync probe for our ticketing system and I'm using get_alarms callback to nas.

 

PDS assignedTo = new PDS(); assignedTo.PutString("assigned_to", "sync"); Request alarmList = new Request("get_alarms", assignedTo); PDS alarms = new PDS(); alarms = SendRequest("/Dev/Main/fihkinim01/nas", alarmList);

 If there are no tickets assigned to user "sync", it will automatically log an error message:

"Request failed: Faulty status in reply message; expected 0 (OK), got 4 (Key not found.). "

 

I don't want to avoid this by setting the loglevel low, but I'd rather just have it not produce the error at all.

I'm using the C# code from the codewizard and the newest .NET api available. Apparently logging Request error returns is built in now. However, this is not an actual error, the callback should just return 0 entries, so it's a bit misleading. I guess the callback in the Nas could be changed as well..

 

If anyone has any ideas how to get around this, would be nice.

 

Also it would stall the whole probe if it returned 0 and was not within try/catch.

 

-jon

Outcomes