Skip to content

Commit

Permalink
improve messages
Browse files Browse the repository at this point in the history
  • Loading branch information
monkpow committed Jan 7, 2025
1 parent 03d27fb commit b51c5d5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/composition/watchers/watcher/introspection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use crate::{
watch::Watch,
};

use rover_std::{errln, infoln};

/// Subgraph introspection
#[derive(Debug, Clone)]
pub struct SubgraphIntrospection {
Expand Down Expand Up @@ -51,16 +53,20 @@ impl SubgraphIntrospection {
.filter_map(|change| async move {
match change {
Ok(subgraph) => {
eprintln!(
"Connectivity restored for subgraph \"{}\".\n",
infoln!(
"Connectivity restored for subgraph \"{}\".",
subgraph.name()
);
Some(subgraph)
}
Err(err) => {
eprintln!("Error detected communicating with subgraph: {}", err);
eprintln!("Note: Schema changes will not be reflected.");
eprintln!("Will retry but subgraph logs should be inspected.\n\n");
errln!(
"{} \
Error communicating with subgraph.
* Schema changes will not be reflected.
* Inspect subgraph logs for more information.",
err
);
tracing::error!("{:?}", err);
None
}
Expand Down

0 comments on commit b51c5d5

Please sign in to comment.