Skip to content

Cloudflare: Error when unmarshaling priority field for cfRecord #367

@pgaskin

Description

@pgaskin

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}} ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions