diff --git a/main.go b/main.go
index a1717f5..bf6720e 100644
--- a/main.go
+++ b/main.go
@@ -190,7 +190,7 @@ func main() {
})
pushoverMessages = append(pushoverMessages, fmt.Sprintf(
- "Action: update\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
+ "Action: update\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
zone.Domain,
record.Name,
record.Type,
@@ -217,7 +217,7 @@ func main() {
})
pushoverMessages = append(pushoverMessages, fmt.Sprintf(
- "Action: create\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
+ "Action: create\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
zone.Domain,
record.Name,
record.Type,
@@ -254,7 +254,7 @@ func main() {
})
pushoverMessages = append(pushoverMessages, fmt.Sprintf(
- "Action: delete\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
+ "Action: delete\nZone: %s\nRecord: %s\nType: %s\nValue: %s\nTTL: %d",
hZone.Name,
hRecord.Name,
hRecord.Type,
@@ -275,6 +275,7 @@ func main() {
hetzner.DeleteRecord(&record)
if err != nil {
log.Error(err)
+ continue
}
log.Warn(
@@ -287,9 +288,10 @@ func main() {
log.Info("Starting sync (step 2: create)", "dry_run", config.DryRun)
for _, record := range recordsToCreate {
if !config.DryRun {
- newRecord, err := hetzner.UpdateRecord(&record)
+ newRecord, err := hetzner.CreateRecord(&record)
if err != nil {
log.Error(err)
+ continue
}
log.Warn(
@@ -305,6 +307,7 @@ func main() {
newRecord, err := hetzner.UpdateRecord(&record)
if err != nil {
log.Error(err)
+ continue
}
log.Warn(