microsofthackathons / tdi

Command-line interface to Microsoft To Do
MIT License
7 stars 3 forks source link

Handle no connection error #27

Open kitplummer opened 2 years ago

kitplummer commented 2 years ago

Currently throws GraphError if "No such host is known" which results when no connection exists

kitplummer commented 2 years ago
Error: Request error:
reqwest::Error {
    kind: Request,
    url: Url {
        scheme: "https",
        cannot_be_a_base: false,
        username: "",
        password: None,
        host: Some(
            Domain(
                "graph.microsoft.com",
            ),
        ),
        port: None,
        path: "/v1.0/me",
        query: None,
        fragment: None,
    },
    source: hyper::Error(
        Connect,
        ConnectError(
            "dns error",
            Os {
                code: 11001,
                kind: Uncategorized,
                message: "No such host is known.",
            },
        ),
    ),
}