lmammino / godaddy-dns

A Node.js script to programmatically update GoDaddy DNS records
https://lmammino.github.io/godaddy-dns/
MIT License
78 stars 21 forks source link

"message":"is not a array" #31

Closed luuudiii1 closed 6 years ago

luuudiii1 commented 6 years ago

Since a week ago the script won't accept the record array in the config file anymore. Here is the exact error output:

StatusCodeError: 422 - {"code":"INVALID_BODY","fields":[{"code":"UNEXPECTED_TYPE","message":"is not a array","path":"records"}],"message":"Request body doesn't fulfill schema, see details in fields"}

And here is the code auf my conf.json:

{ "apiKey":"xyz", "secret":"abc", "domain":"domain.xyz", "records":[ { "type":"A", "name":"@", "ttl":600 } ] }

Testet on different machines with clean installation. Thank you!

aandrulis commented 6 years ago

It looks like godaddy changed their api. Mine was working last week too. I've created a PR with my solution wrapping the current request body in a list. https://github.com/lmammino/godaddy-dns/pull/32