golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
67 stars 19 forks source link

fw: don't log any error in case of no rolled out release #424

Closed mniestroj closed 1 year ago

mniestroj commented 1 year ago

Handle empty map in zcbor_map_decode() by returning -ENOENT, so that case can be handled by caller differently than parsing errors.

Don't log any error in case of no rolled out release. Bring back the same behavior when QCBOR was used and -ENOENT was returned without producing any logs.

Fixes: d6b33f5c9af0 ("fw: convert from QCBOR to zcbor") Alternative to: #423

Changes from:

[00:00:00.030,000] <inf> golioth_system: Client connected!
[00:00:00.030,000] <dbg> golioth_dfu: golioth_desired_update: Desired
                                      a0                                               |.                
[00:00:00.030,000] <wrn> golioth: Failed to decode desired map
[00:00:00.030,000] <err> golioth_dfu: Failed to parse desired version: -77

to:

[00:00:00.070,000] <inf> golioth_system: Client connected!
[00:00:00.080,000] <dbg> golioth_dfu: golioth_desired_update: Desired
                                      a0                                               |.                
[00:00:00.080,000] <inf> golioth_dfu: No release rolled out yet
github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit cabad07):

https://golioth-zephyr-sdk-doxygen-dev--pr424-fw-dont-err-on-n-cl099tqh.web.app

(expires Thu, 17 Aug 2023 11:52:01 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a389eefadf4b4b68a539327b3459dd66c142cf49