Returning service fault when overriding HistoryReadRaw
Posted: 15 Nov 2022, 11:33
Hi
To allow historical access on our server, we are overriding HistoryReadRaw.
In some cases (example when 2 of 3 required parameters are not specified - StartTime, EndTime and NumValuesPerNode) the server must raise a service fault (BadHistoryOperationInvalid in this example).
When in HistoryReadRaw we do this :
return new HistoryReadResult() { StatusCode = StatusCodes.BadHistoryOperationInvalid }
The status is returned but at an operational level.
So question is : how can we set the service fault using code in HistoryReadRaw methog ?
Thanks
To allow historical access on our server, we are overriding HistoryReadRaw.
In some cases (example when 2 of 3 required parameters are not specified - StartTime, EndTime and NumValuesPerNode) the server must raise a service fault (BadHistoryOperationInvalid in this example).
When in HistoryReadRaw we do this :
return new HistoryReadResult() { StatusCode = StatusCodes.BadHistoryOperationInvalid }
The status is returned but at an operational level.
So question is : how can we set the service fault using code in HistoryReadRaw methog ?
Thanks