Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Owner deserialization error #193

Open
augustuswm opened this issue Oct 12, 2022 · 1 comment
Open

Owner deserialization error #193

augustuswm opened this issue Oct 12, 2022 · 1 comment

Comments

@augustuswm
Copy link

augustuswm commented Oct 12, 2022

Starting yesterday we started seeing errors where the response from ListZones were failing to deserialize correctly. It looks to be related to the owner field in the API response. The field in the response looks like:

{
  "owner": {
    "id": null,
    "type": "user",
    "email": null
  }
}

This conflicts with the Owner enum which expects the id and email fields to be non-null:

pub enum Owner {
    User { id: String, email: String },
    Organization { id: String, name: String },
}

Unsure if this was a recent change in the API, but presumably these should now be Option<String> if null is a valid response value? (Unclear if this is an API issue returning null when it shouldn't or if this is a library update)

@taladar
Copy link

taladar commented Aug 30, 2024

This issue still exists in the latest master version. Personally I think the API response is strange though, I would expect null for the entire owner field in this case, not a User with null id and null email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants