1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Cleanup: Bubble errors up from diff instead of panic (#799) (#817)

This commit is contained in:
Mike Cochrane
2020-08-21 07:49:00 +12:00
committed by GitHub
parent 79357bb667
commit 59747a96f0
27 changed files with 122 additions and 36 deletions

View File

@@ -70,7 +70,10 @@ func (c *adProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Co
models.PostProcessRecords(foundRecords)
differ := diff.New(dc)
_, creates, dels, modifications := differ.IncrementalDiff(foundRecords)
_, creates, dels, modifications, err := differ.IncrementalDiff(foundRecords)
if err != nil {
return nil, err
}
// NOTE(tlim): This provider does not delete records. If
// you need to delete a record, either delete it manually
// or see providers/activedir/doc.md for implementation tips.