Skip to content

Commit f8890b3

Browse files
committed
improve
1 parent dc773dc commit f8890b3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

objectstore-service/src/backend/tiered.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,10 @@ impl TryFrom<&UploadId> for TieredUploadId {
599599
let json = base64::engine::general_purpose::URL_SAFE_NO_PAD
600600
.decode(value.as_bytes())
601601
.map_err(|e| {
602-
Error::new(ErrorKind::Internal).context(format!("invalid multipart upload ID: {e}"))
602+
Error::new(ErrorKind::InvalidInput)
603+
.context(format!("invalid multipart upload ID: {e}"))
603604
})?;
604-
serde_json::from_slice(&json).context("decoding multipart token")
605+
serde_json::from_slice(&json).kind(ErrorKind::InvalidInput)
605606
}
606607
}
607608

0 commit comments

Comments
 (0)