unifi-ddns icon indicating copy to clipboard operation
unifi-ddns copied to clipboard

TypeError: Cannot set properties of undefined (setting 'content') when record does not exist

Open gbrayut opened this issue 1 year ago • 1 comments

If you try and use this before creating a record, it returns an error:

$ curl -u "example.com:redacted" "https://ddns.example.workers.dev/update?ip=192.168.0.1&hostname=ddns.example.com"
TypeError: Cannot set properties of undefined (setting 'content')
    at Cloudflare.updateRecord (worker.js:183:22)
    at informAPI (worker.js:65:35)
    at async handleRequest (worker.js:30:26)

May just want to update the README.md to indicate the dns record you are using must be created or already exist with a previous value.

Other than that, this worked great. Thanks!

gbrayut avatar Aug 05 '22 19:08 gbrayut

Thanks for reporting the issue! Please submit a merge request, and I'll close this issue out

willswire avatar Aug 09 '22 14:08 willswire

Fixed by #31

willswire avatar Apr 23 '23 01:04 willswire