OpcUaClient: HistoryRead ignores per-node StatusCode (BadAggregateNotSupported looks like empty data) #649
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during #622. OpcUaClientDriver.ExecuteHistoryReadAsync (~lines 1982-2003) never checks r.StatusCode on the per-node HistoryReadResult, so a Processed read the upstream server rejects (e.g. BadAggregateNotSupported) is surfaced as empty data instead of the status. Test OpcUaClientDriverHistoryWireTests pins the current behaviour and must be updated with the fix.
Fixed on master (
22e79112+b8c21367, merged83ab1234).ExecuteHistoryReadAsyncnow checks each node's StatusCode (CodeBits):BadAggregateNotSupported→HistoryAggregateNotSupportedException; any other Bad → newHistoryReadStatusException(rejects non-Bad codes) relayed verbatim for that node only byServeNodeAsync/ServeRawPagedAsync; node-levelBadNoDatastays an empty result. Wire tests cover Processed, Raw paging (resume read throws, sibling stays Good, no stray cursor) and BadNoData; each goes red when its fix is reverted.⚠️ Latent in production: review found the server never dispatches HistoryRead to a driver's
IHistoryProvider(only the server-wide historian source), so no client sees this today. Filed separately.Follow-up for the production-reachability gap: #655.