pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
25 stars 33 forks source link

CPM: Rust: Check status code before saving contents #199

Closed imi415 closed 1 year ago

imi415 commented 1 year ago

The current implementation does not check HTTP status code except those handled internally by reqwest. This patch added an additional check against these invalid status codes by simply comparing with 400, so invalid response payloads are not saved to the disk and user may retry later by re-invoking the update command.

Signed-off-by: Yilin Sun imi415@imi.moe

imi415 commented 1 year ago

Related to: #162

flit commented 1 year ago

Thank you!!