Skip to content

Commit

Permalink
Only cache ip updates if all providers succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewmeyer committed Oct 18, 2024
1 parent 838b030 commit f39ec2d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/providers/cloudflare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ impl Provider for Cloudflare {
if updated.success {
debug!("Record updated: {:#?}", updated);
} else {
error!("Failed to update domain ({}) record: {:#?}", domain.name, updated);
return Err(anyhow!("Failed to update domain ({}) record", domain.name));
error!(
"Failed to update domain ({}) record: {:#?}",
domain.name, updated
);
return Err(anyhow!(
"Failed to update domain ({}) record",
domain.name
));
}
} else {
debug!(
Expand All @@ -149,8 +155,14 @@ impl Provider for Cloudflare {
if created.success {
debug!("Record created: {:#?}", created);
} else {
error!("Failed to create domain ({}) record: {:#?}", domain.name, created);
return Err(anyhow!("Failed to create domain ({}) record", domain.name));
error!(
"Failed to create domain ({}) record: {:#?}",
domain.name, created
);
return Err(anyhow!(
"Failed to create domain ({}) record",
domain.name
));
}
};
}
Expand Down

0 comments on commit f39ec2d

Please sign in to comment.