Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change some errors to warns/infos #3885

Merged
merged 1 commit into from Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions gateway/ln-gateway/src/lib.rs
Expand Up @@ -521,7 +521,7 @@ impl Gateway {
}
}
Err(e) => {
error!("Failed to retrieve Lightning info: {e:?}");
warn!("Failed to retrieve Lightning info: {e:?}");
}
}
}
Expand All @@ -532,7 +532,7 @@ impl Gateway {

self.handle_disconnect(htlc_task_group).await;

error!("Disconnected from Lightning Node. Waiting 5 seconds and trying again");
warn!("Disconnected from Lightning Node. Waiting 5 seconds and trying again");
sleep(Duration::from_secs(5)).await;
}
},
Expand Down Expand Up @@ -1119,13 +1119,13 @@ impl Gateway {
)
.await
{
error!("Error registering federation {federation_id}: {e:?}");
warn!("Error registering federation {federation_id}: {e:?}");
}
}
}
Err(e) => {
error!(
"Could not retrieve route hints, gateway will not be registered: {e:?}"
warn!(
"Could not retrieve route hints, gateway will not be registered for now: {e:?}"
);
}
}
Expand Down
7 changes: 5 additions & 2 deletions modules/fedimint-ln-client/src/receive.rs
Expand Up @@ -16,7 +16,7 @@ use fedimint_ln_common::{LightningClientContext, LightningInput};
use lightning_invoice::Bolt11Invoice;
use serde::{Deserialize, Serialize};
use thiserror::Error;
use tracing::error;
use tracing::{error, info, warn};

use crate::LightningClientStateMachines;

Expand Down Expand Up @@ -211,8 +211,11 @@ impl LightningReceiveConfirmedInvoice {
},
// FIXME: should we filter for retryable errors here to not swallow implementation
// bugs? (there exist more places like this)
Err(error) if error.is_retryable() => {
info!("External LN payment retryable error waiting for preimage decryption: {error:?}");
}
Err(error) => {
error!("External LN payment error waiting for preimage decryption: {error:?}");
warn!("External LN payment non-retryable error waiting for preimage decryption: {error:?}");
}
}

Expand Down