Skip to content

Conversation

@mrueg
Copy link
Owner

@mrueg mrueg commented Jan 28, 2024

FYI @webwurst @aellwein
This hopefully fixes the issue, I still need to test it tomorrow with an empty domain (and might change it to logLevel debug depending on how noisy it is)

Fixes: #5

recs, err := p.session.InfoDnsRecords(zoneName)
if err != nil {
_ = level.Error(p.logger).Log("msg", "unable to get DNS records for domain", "zone", zoneName, "error", err)
if p.session.LastResponse.Status == string(nc.StatusError) && p.session.LastResponse.StatusCode == 5029 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, i would maybe check additionally for if p.session.LastResponse != nil, just not to assume that my client implementation would always be correct to set this 🤣

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point :D thanks!

@mrueg mrueg force-pushed the fix-empty-records branch from 8be5f81 to af3fe8b Compare January 29, 2024 15:15
@mrueg mrueg merged commit b156566 into main Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webhook stops when there are no records for a domain at netcup

3 participants