You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Ji-Xinyou (via GitHub)" <gi...@apache.org> on 2023/04/30 16:00:37 UTC

[GitHub] [incubator-opendal] Ji-Xinyou commented on a diff in pull request #2171: fix(service/s3): set retryable on batch

Ji-Xinyou commented on code in PR #2171:
URL: https://github.com/apache/incubator-opendal/pull/2171#discussion_r1181255201


##########
core/src/services/s3/error.rs:
##########
@@ -79,6 +71,34 @@ pub async fn parse_error(resp: Response<IncomingAsyncBody>) -> Result<Error> {
     Ok(err)
 }
 
+/// Returns the Errorkind of this code and whether the error is retryable.
+/// All possible error code: <https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList>
+pub fn kind_and_retryable(code: &str) -> Option<(ErrorKind, bool)> {

Review Comment:
   Nice one, the naming I chose was bad :(((((



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org