Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for queryCaa ENODATA when using local DNS #32

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

DeBuXer
Copy link
Contributor

@DeBuXer DeBuXer commented Sep 18, 2024

Improved error handling when retrieving the CAA record. It sometimes failed when you requested a CAA record for a domain that did not have one. This issue did not occur with subdomains for a certain reason.

@willnode
Copy link
Owner

Thank you! Can you make it consistent like the other one? Maybe one line change would be enough

const records = await dns.resolveCaa(host).catch(() => null);

@DeBuXer
Copy link
Contributor Author

DeBuXer commented Sep 18, 2024

This is indeed a better approach. However, I had to use the nullish coalescing operator, otherwise, the error 'Cannot read properties of null (reading "filter")' would appear when no CAA record was found.

@willnode willnode merged commit e98137a into willnode:main Sep 18, 2024
3 checks passed
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.

2 participants