Skip to content

Avoid error on empty requests #223

Open
@geekingfrog

Description

@geekingfrog

While using the crate, I noticed some requests will be rejected by twitch because empty. For example:

get_users::GetUsersRequest::builder()
    .id(vec![])
    .login(vec![])
    .build();

will be rejected. But in this case, the response will be empty. Would it be desirable to bypass the entire call and immediately returns a response in this case?
Or, looking at the RequestGet trait, it seems maybe it would be better to detect this error when parsing the response and recover?
What do you think?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions