mirror of
https://github.com/beerpiss/saekawa.git
synced 2024-11-27 17:00:50 +01:00
fix: nicer error messages for network errors
This commit is contained in:
parent
275b18ae4f
commit
e08af6069c
@ -164,7 +164,10 @@ where
|
||||
Ok(r) => r,
|
||||
Err(ureq::Error::Transport(e)) => {
|
||||
error!("Could not reach Tachi API. Is your network up or are they having issues?.");
|
||||
error!("Detailed error: {e:#?}");
|
||||
|
||||
if let Some(m) = e.message() {
|
||||
error!("Detailed error message: {}", m);
|
||||
}
|
||||
|
||||
if attempt != MAX_RETRY_COUNT - 1 {
|
||||
let wait_time = exponential_backoff(&mut rand, attempt);
|
||||
@ -231,7 +234,7 @@ fn poll_deferred_import(client: &ureq::Agent, api_key: &str, poll_url: &str) {
|
||||
) {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
error!("Could not poll import status. While Tachi has received the score, Saekawa cannot make any guarantees about its success. Detailed error: {e:#?}");
|
||||
error!("Could not poll import status. While Tachi has received the score, Saekawa cannot make any guarantees about its success. Detailed error: {e:#}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user