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

replace unwrap calls in azure_core #661

Merged
merged 5 commits into from
Feb 25, 2022

Conversation

bmc-msft
Copy link
Contributor

In multiple places, the SDK panics at runtime. This changes the unwrap
calls to handle the error in a non-panic fashion.

For places that have predicates that validate the invariant, unwrap has
been replaced with expect that describes the justification.

This is related to, but does not address, #652

In multiple places, the SDK panics at runtime.  This changes the unwrap
calls to handle the error in a non-panic fashion.

For places that have predicates that validate the invariant, unwrap has
been replaced with `expect` that describes the justification.

This is related to, but does not address, Azure#652
Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I do have one thing that I think we should not change.

sdk/core/src/error/http_error.rs Outdated Show resolved Hide resolved
sdk/core/src/policies/retry_policies/retry_policy.rs Outdated Show resolved Hide resolved
@bmc-msft bmc-msft requested a review from rylev February 22, 2022 20:10
Copy link
Contributor

@rylev rylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just needs a rebase

@bmc-msft bmc-msft merged commit 3a6695e into Azure:main Feb 25, 2022
@bmc-msft bmc-msft deleted the remove-unwrap-from-core branch February 25, 2022 16:19
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.

2 participants