Skip to content
New issue

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

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

Already on GitHub? # to your account

Cloudflare: Error when unmarshaling priority field for cfRecord #367

Closed
pgaskin opened this issue Jun 20, 2018 · 0 comments · Fixed by #368
Closed

Cloudflare: Error when unmarshaling priority field for cfRecord #367

pgaskin opened this issue Jun 20, 2018 · 0 comments · Fixed by #368

Comments

@pgaskin
Copy link
Contributor

pgaskin commented Jun 20, 2018

Cloudflare now seems to be returning a string instead of an int for the priority field of a cfRecord. I'm not sure if this is a mistake in the Cloudflare API or not, but I think dnscontrol should use json.Number to allow for this kind of thing.

Here is the error: Error getting corrections: Error fetching record list from cloudflare: json: cannot unmarshal string into Go struct field cfRecord.priority of type uint16

And here is a sample piece of the json: ... {"id":"...","type":"MX","name":"...","content":"mxb.mailgun.org","proxiable":false,"proxied":false,"ttl":120,"priority":"10","locked":false,"zone_id":"...","zone_name":"...","modified_on":"2018-04-18T23:52:15.186916Z","created_on":"2018-04-18T23:52:15.186916Z","meta":{"auto_added":false,"managed_by_apps":false,"managed_by_argo_tunnel":false}} ...

@pgaskin pgaskin changed the title Cloudflare: Error when unmarshaling priority field for data Cloudflare: Error when unmarshaling priority field for cfRecord Jun 20, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant