diff --git a/src/import/attachment.rs b/src/import/attachment.rs index 3d49851..5515c36 100644 --- a/src/import/attachment.rs +++ b/src/import/attachment.rs @@ -53,9 +53,9 @@ impl Actor for ImportAttachmentActor { // - - - download the attachment from trello let dir_path = this.ctx.temp_fs.base().join(&*this.trello_attachment.id); let dir = this.ctx.temp_fs.dir(&dir_path); - dir.create()?; + dir.create()?; // FIXME: (#6) handle error let file_path = dir_path.join(&*this.trello_attachment.name); - ask!(this.rate_limit_actor, RequestToken)?; + ask!(this.rate_limit_actor, RequestToken)?; // FIXME: (#6) handle error let attachment_path = this .ctx .trello_client() @@ -66,7 +66,7 @@ impl Actor for ImportAttachmentActor { &this.ctx.temp_fs, ) .await - .with_context(|| f!("saving attachment {}", file_path.display()))?; + .with_context(|| f!("saving attachment {}", file_path.display()))?; // FIXME: (#6) handle error let attachment_file = this.ctx.temp_fs.file(&attachment_path); // - - - upload the attachment to nextcloud card let attachment = this @@ -88,7 +88,7 @@ impl Actor for ImportAttachmentActor { e.to_string() ); }) - .with_context(|| f!("adding attachment to card {}", file_path.display()))?; + .with_context(|| f!("adding attachment to card {}", file_path.display()))?; // FIXME: (#6) handle error p!( this.ctx.prt, ">> Attachment added: {}:{}", @@ -99,9 +99,9 @@ impl Actor for ImportAttachmentActor { // delete local copy of attachment attachment_file .remove() - .with_context(|| f!("deleting temp file {attachment_file}"))?; + .with_context(|| f!("deleting temp file {attachment_file}"))?; // FIXME: (#6) handle error dir.remove() - .with_context(|| f!("deleting temp dir {dir}"))?; + .with_context(|| f!("deleting temp dir {dir}"))?; // FIXME: (#6) handle error Ok(actor_ref.stop_gracefully().await?) }); diff --git a/src/import/card.rs b/src/import/card.rs index 196964e..32a4203 100644 --- a/src/import/card.rs +++ b/src/import/card.rs @@ -81,7 +81,7 @@ impl Actor for ImportCardActor { desc.as_ref(), ) .await - .result?; + .result?; // FIXME: (#6) handle error let mut limit = RateLimit::new("labels & attachments", 10, 10.0, this.ctx.now()); diff --git a/src/import/label.rs b/src/import/label.rs index 8d493e2..d4d4877 100644 --- a/src/import/label.rs +++ b/src/import/label.rs @@ -47,8 +47,8 @@ impl Actor for ImportLabelActor { trello_name: this.trello_label.name.clone(), trello_color: this.trello_label.color.clone() } - )?; - // - - - add the label to the nextcloud card + )?; // FIXME: (#6) handle error + // - - - add the label to the nextcloud card this.ctx .deck_client() .add_label_to_card( @@ -58,7 +58,7 @@ impl Actor for ImportLabelActor { label_id, ) .await - .result?; + .result?; // FIXME: (#6) handle error Ok(actor_ref.stop_gracefully().await?) }); diff --git a/src/import/stack.rs b/src/import/stack.rs index 73c6a8e..f565036 100644 --- a/src/import/stack.rs +++ b/src/import/stack.rs @@ -62,7 +62,7 @@ impl Actor for ImportStackActor { crate::p!(this.ctx.prt, "Importing stack: {}", this.trello_stack.name); // - get the list of trello cards in the stack - ask!(this.rate_limit_actor, RequestToken)?; + ask!(this.rate_limit_actor, RequestToken)?; // FIXME: (#6) handle error let mut trello_cards = trello_client .list_cards(&TrelloListId::new(this.trello_stack.id.as_ref())) .await @@ -75,7 +75,7 @@ impl Actor for ImportStackActor { // - for each card in the trello stack for trello_card in trello_cards.into_iter() { limit.block_until_token_available(this.ctx.now()).await; - ask!(this.rate_limit_actor, RequestToken)?; + ask!(this.rate_limit_actor, RequestToken)?; // FIXME: (#6) handle error let trello_card_name = trello_card.name.clone(); let child: ActorRef = spawn_in_thread!( actor_ref.clone(), diff --git a/src/import/stacks.rs b/src/import/stacks.rs index 256db3b..8a19847 100644 --- a/src/import/stacks.rs +++ b/src/import/stacks.rs @@ -33,9 +33,9 @@ async fn create_any_missing_stacks( let missing_stacks = selected_trello_stacks .iter() .filter(|trello_stack| { - !nextcloud_stacks - .iter() - .any(|nextcloud_stack| nextcloud_stack.title.deref() == trello_stack.name.deref()) + !nextcloud_stacks.iter().any(|nextcloud_stack| + // FIXME: (#7) nextcloud title is limited to 100 characters + nextcloud_stack.title.deref() == trello_stack.name.deref()) }) .cloned() .collect::>(); @@ -55,7 +55,7 @@ async fn create_any_missing_stacks( let stack = deck_client .create_stack( nextcloud_board_id, - (&missing_stack.name).into(), + (&missing_stack.name).into(), // FIXME: (#7) limited to 100 characters (&missing_stack.pos).into(), ) .await