Crash if failing to refresh token
Got this crash when Karpulse failed to refresh the spotify token.
We should probably keep trying for a while instead.
thread 'rocket-worker-thread' panicked at 'called `Result::unwrap()` on an `Err` value: Http(Client(reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("accounts.spotify.com")), port: None, path: "/api/token", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" })) }))', src/spotify.rs:125:52
stack backtrace:
0: 0x56140a044cba - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x56140a044cba - std::backtrace_rs::backtrace::trace_unsynchronized::h2292bca8571cb919
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x56140a044cba - std::sys_common::backtrace::_print_fmt::h9c461f248e4ae90d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:65:5
3: 0x56140a044cba - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he9fe6bf1a39182e1
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:44:22
4: 0x56140a06af8e - core::fmt::write::h032658c119c720d7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/fmt/mod.rs:1208:17
5: 0x56140a03e055 - std::io::Write::write_fmt::h299fc90dfae41c0d
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/io/mod.rs:1682:15
6: 0x56140a044a85 - std::sys_common::backtrace::_print::heb70d25df9937e3f
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:47:5
7: 0x56140a044a85 - std::sys_common::backtrace::print::had745c0a76b8b521
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:34:9
8: 0x56140a04602f - std::panicking::default_hook::{{closure}}::h1ea782cdfa2fd097
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:267:22
9: 0x56140a045d6b - std::panicking::default_hook::h1cc3af63455a163c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:286:9
10: 0x56140a04675c - std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:688:13
11: 0x56140a0464f9 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:579:13
12: 0x56140a04516c - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
13: 0x56140a046202 - rust_begin_unwind
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
14: 0x56140a068183 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
15: 0x56140a068693 - core::result::unwrap_failed::h62abf61e411aaa08
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
16: 0x56140983ebcd - karapulse::spotify::Spotify::new::{{closure}}::{{closure}}::he23564642ac9e72a
17: 0x5614097630aa - tokio::runtime::task::harness::Harness<T,S>::poll::h0b2283ad78d83d37
18: 0x561409f082b7 - tokio::runtime::scheduler::multi_thread::worker::Context::run_task::ha607f37ee76bd2cc
19: 0x561409f07c0b - tokio::runtime::scheduler::multi_thread::worker::Context::run::h76185a84661264e5
20: 0x561409f07818 - tokio::runtime::scheduler::multi_thread::worker::run::h05acc97a715a48ae
21: 0x561409efcb91 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::ha5ef5188a9c9c8d6
22: 0x561409ef71fe - tokio::runtime::task::core::Core<T,S>::poll::hbc47e601b22f4807
23: 0x561409f0c72a - tokio::runtime::task::harness::Harness<T,S>::poll::h19fc08f45d75c7da
24: 0x561409ef0b50 - tokio::runtime::blocking::pool::Inner::run::h3a14faf8311dcb47
25: 0x561409efc092 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4fade4694a9059d9
26: 0x561409f0480f - core::ops::function::FnOnce::call_once{{vtable.shim}}::h1ee4fe278a76031b
27: 0x56140a049903 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb77d8d72ebcf79c4
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
28: 0x56140a049903 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc08c3353e1568487
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
29: 0x56140a049903 - std::sys::unix::thread::Thread::new::thread_start::h7168e596cd5e5ce6
at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys/unix/thread.rs:108:17
30: 0x7f904328cdcd - start_thread
31: 0x7f9043312630 - clone3
32: 0x0 - <unknown>
./spotify.sh: line 26: 43154 Aborted (core dumped) cargo run --release -- -r