Skip to content

Reqwest Error during ListIter #54

@fluidvanadium

Description

@fluidvanadium

Describe the bug
I am drafting a list of cards and getting a reqwest error

To Reproduce
source code: - (https://github.com/fluidvanadium/sealedmancer99) - # 862e3d5 - cargo run
the program makes a search, then iterates through it using .next() and records the card names

Field that failed to deserialise/serde error message

> Belltoll Dragon
> Belltower Sphinx
> Beloved Beggar
> Beloved Chaplain
> Beloved Princess
> Belt of Giant Strength
[src/main.rs:62:40] e = ReqwestError {
    error: reqwest::Error {
        kind: Decode,
        source: Error("expected value", line: 1, column: 1),
    },
    url: Url {
        scheme: "https",
        cannot_be_a_base: false,
        username: "",
        password: None,
        host: Some(
            Domain(
                "api.scryfall.com",
            ),
        ),
        port: None,
        path: "/cards/search",
        query: Some(
            "format=json&include_extras=true&include_multilingual=false&include_variations=false&order=name&page=14&q=%28%28%28%28%28format%3Avintage+and+-%21%22hobble%22%29+or+%21%22stone-throwing+devils%22+or+%21%22pradesh+gypsies%22+or+%21%22shahrazad%22%29+and+-type%3A%22basic%22+and+-%28is%3Ameld+and+-fulloracle%3A%
22meld%22%29+and+-%28%28fulloracle%3A%22sticker%22+or+fulloracle%3A%22ticket%22+or+fulloracle%3A%22%7Btk%7D%22%29+and+-%21%22ticket+tortoise%22+and+-name%3A%22ticket+booth%22+and+-name%3A%22fatal+attraction%22%29%29+or+name%3A%2F%5Ea-%2F%29+and+%28not%3Asplit%29%29&unique=cards",
        ),
        fragment: None,
    },
}
thread 'main' panicked at src/main.rs:43:68:
called `Result::unwrap()` on an `Err` value: "Error making request to https://api.scryfall.com/cards/search?format=json&include_extras=true&include_multilingual=false&include_variations=false&order=name&page=14&q=%28%28%28%28%28format%3Avintage+and+-%21%22hobble%22%29+or+%21%22stone-throwing+devils%22+or+%21%22pradesh+gy
psies%22+or+%21%22shahrazad%22%29+and+-type%3A%22basic%22+and+-%28is%3Ameld+and+-fulloracle%3A%22meld%22%29+and+-%28%28fulloracle%3A%22sticker%22+or+fulloracle%3A%22ticket%22+or+fulloracle%3A%22%7Btk%7D%22%29+and+-%21%22ticket+tortoise%22+and+-name%3A%22ticket+booth%22+and+-name%3A%22fatal+attraction%22%29%29+or+name%3A%
2F%5Ea-%2F%29+and+%28not%3Asplit%29%29&unique=cards: error decoding response body"

Version:

[[package]]
name = "scryfall"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "463b6d0919b5df19b2a2b8c044ad279199133152bf5224bdf6fbf8725d8d2629"

Additional context
This bug didnt happen when I was using Query::custom("followed by a string search")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions