unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices
GNU General Public License v3.0
3.86k stars 415 forks source link

Cloudflare-ddns is getting error 81057 when updating already existing record at Cloudflare #153

Closed Postman76 closed 3 years ago

Postman76 commented 3 years ago

Describe the bug This script is not recognized if the records which are going to be modified are already existing connected Cloudflare account /zone.

To Reproduce Steps to reproduce the behavior:

  1. Setup your config.json.
  2. Start Cloudflare-ddns service.
  3. let it run a while and do few update rounds.
  4. See the error with podman logs

Expected behavior Adding a new record or updating existing record information should be visible in log files without errors.

Screenshots cloudflare_API_update_error

UDM Information

Additional context Used Cloudflare API method "POST" is only meant for adding new records to the Cloudflare. And it is causing an error now when the record is already existing at Cloudflare. There are other methods available on API like PATCH & PUT. This script needs to have a new logic created to check if the submitted record already existing at Cloudflare (with GET) and then selecting the correct submit method based on that check.

boostchicken commented 3 years ago

Closing as dupe of https://github.com/boostchicken/udm-utilities/issues/141