diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e7b354..26ac0ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Unreleased +- Retry when putting comments - Add ability to get email by id - Add ability to upload attachment content for comments diff --git a/api/src/lib.rs b/api/src/lib.rs index 152b1e3..c14ca0d 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -522,12 +522,15 @@ impl Client { comments: Vec, no_charge: bool, ) -> Result> { + // Retrying here despite the potential for 409's in order to increase reliability when + // working with poor connection + self.splitable_request( Method::PUT, self.endpoints.put_comments(source_name)?, PutCommentsRequest { comments }, Some(NoChargeQuery { no_charge }), - Retry::No, + Retry::Yes, ) } @@ -537,12 +540,14 @@ impl Client { comments: Vec, no_charge: bool, ) -> Result { + // Retrying here despite the potential for 409's in order to increase reliability when + // working with poor connection self.request( &Method::PUT, &self.endpoints.put_comments(source_name)?, &Some(PutCommentsRequest { comments }), &Some(NoChargeQuery { no_charge }), - &Retry::No, + &Retry::Yes, ) }