Repository navigation
fix(@hertzg/hikvision-api): read an empty optional element as absent - #307
Merged
Merged
Conversation
…so one bad regionID cannot end the alert stream An AcuSense camera relayed by an NVR posts fielddetection alerts whose DetectionRegionEntry has an empty <regionID></regionID>. optional(int()) threw, the error surfaced from the ReadableStream, and every channel's alerts stopped until the consumer reconnected. decodeFields now treats an optional element with no text, children or attributes as missing, so the region reads without an id. Alerts also expose the snapshot: pictureUrl from <bkgUrl> and pictureTransport from <detectionPictureTransType>.
Contributor
|
Docs preview: https://hertzg.github.io/jsr-monorepo/pr/307/ |
Contributor
Benchmark ResultsNo significant changes detected. 31 benchmark(s) within their noise floor. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
=======================================
Coverage 97.81% 97.82%
=======================================
Files 424 424
Lines 14712 14731 +19
Branches 1560 1566 +6
=======================================
+ Hits 14390 14410 +20
Misses 186 186
+ Partials 136 135 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An AcuSense camera through an NVR posts
fielddetectionalerts with an empty<regionID></regionID>.optional(int())threw and the whole alert stream errored for every channel.decodeFieldstreats an optional element with no text, children or attributes as absent; a required one still throws.AlertgainspictureUrl(<bkgUrl>) andpictureTransport(<detectionPictureTransType>).