cloudflare / cloudflare/cloudflare-rs

Owner deserialization error

Open
#193 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
316
Forks
111
PR merge metrics
No merged PRs in 30d

Description

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:

```json
{
"owner": {
"id": null,
"type": "user",
"email": null
}
}
```
This conflicts with the `Owner` enum which expects the `id` and `email` fields to be non-null:
```rust
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` 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.