Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: improve error message on expired token
Slightly improve the error message when an expired token is used. Old experience: thread 'main' panicked at src/fetch.rs:95:10: called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Decode, source: Error("missing field `data`", line: 1, column: 40) } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace New experience: thread 'main' panicked at src/fetch.rs:98:13: Request to Gitlab failed: HTTP status client error (401 Unauthorized) for url (https://gitlab.vpn.cyberus-technology.de/api/graphql) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace It's not perfect and a better solution would be proper error handling with anyhow. But this would have already poked me in the right direction.
- Loading branch information