Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 29, 2022

Conversation

imi415
Copy link
Contributor

@imi415 imi415 commented Dec 21, 2022

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 [email protected]

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 <[email protected]>
@imi415
Copy link
Contributor Author

imi415 commented Dec 21, 2022

Related to: #162

@flit
Copy link
Member

flit commented Dec 22, 2022

Thank you!!

@flit flit requested a review from mbrossard December 22, 2022 20:38
@mathias-arm mathias-arm merged commit 8d3ad31 into pyocd:main Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants