Skip to content

Commit

Permalink
chore(bors): merge pull request #770
Browse files Browse the repository at this point in the history
770: fix(volume/resize): more appropriate error mapping r=dsharma-dc a=dsharma-dc

Quoting from gRPC documentation:
"There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) when it applies so that callers who are iterating through a space can easily look for an OUT_OF_RANGE error to detect when they are done."

The Mayastor CSI driver maps ResourceExhausted to OutOfRange for VolumeExpansion.

Co-authored-by: Diwakar Sharma <diwakar.sharma@datacore.com>
  • Loading branch information
mayastor-bors and dsharma-dc committed Mar 5, 2024
2 parents 828e777 + 7eaeec7 commit 8ed2dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control-plane/agents/src/common/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ impl From<SvcError> for ReplyError {
extra,
},
SvcError::ResizeReplError { .. } => ReplyError {
kind: ReplyErrorKind::FailedPrecondition,
kind: ReplyErrorKind::ResourceExhausted,
resource: ResourceKind::Replica,
source,
extra,
Expand Down

0 comments on commit 8ed2dbb

Please sign in to comment.