Add non-panicy error handling for local pins

This commit is contained in:
Neshura 2023-08-14 22:55:15 +02:00
parent a549c89c33
commit 8b3e6a8380
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -141,7 +141,10 @@ impl Bot {
auth: self.auth.clone()
};
let _ = self.pin(remove_local_pin);
match self.pin(remove_local_pin) {
Ok(_) => {},
Err(e) => println!("Error Unpinning Post: {:#?}", e)
};
}
}
@ -161,7 +164,10 @@ impl Bot {
auth: self.auth.clone(),
};
let _ = self.pin(pin_new_local);
match self.pin(pin_new_local) {
Ok(_) => {},
Err(e) => println!("Error Pinning Post: {:#?}", e)
};;
return Ok(());
}