nrdxp / cfdyndns

CloudFlare Dynamic DNS Client
MIT License
12 stars 12 forks source link

fix: program failing when unknown record type is in zone #56

Closed diogotcorreia closed 3 months ago

diogotcorreia commented 6 months ago

The upstream cloudflare crate does not support parsing CAA records (and others), which means that the result of the record listing endpoint cannot be parsed by cfdyndns, resulting in a crash.

This PR adds a filter to the requests to only get A and AAAA records. However, due to the design of the upstream crate, it is not possible to filter by type without also filtering by content, meaning we have to change the match parameter to any. Additionally, the API only allows to filter by a single type, which means we duplicate the number of requests by making one request for A records and another for AAAA records.

Fixes #54

nrdxp commented 3 months ago

I dunno why CI didn't trigger for this PR. I also don't see the usual section to "approve" the workflow to run for this PR. Given that everything is configured properly and I am the repo owner, I must assume that something strange happened on GitHub's side unless I overlooked something.

In any case I will run it manually and merge if it passes. Thank you :pray: