Skip to content

Commit

Permalink
Merge pull request #381 from tienvx/improve-no-pacts-found-error-message
Browse files Browse the repository at this point in the history
feat: Print provider name in 'no pacts found' message to help debugging
  • Loading branch information
rholshausen authored Feb 6, 2024
2 parents 7222cd2 + 310cb60 commit 22745d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/pact_verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,9 @@ async fn fetch_pact(
buffer
},
Err(err) => {
error!("No pacts found in pact broker '{}': {}", broker_url, err);
error!("No pacts found for provider '{}' in pact broker '{}': {}", provider_name, broker_url, err);
vec![
Err(anyhow!(err).context(format!("No pacts found in pact broker '{}'", broker_url)))
Err(anyhow!(err).context(format!("No pacts found for provider '{}' in pact broker '{}'", provider_name, broker_url)))
]
}
}
Expand Down Expand Up @@ -1316,9 +1316,9 @@ async fn fetch_pact(
buffer
},
Err(err) => {
error!("No pacts found matching the given consumer version selectors in pact broker '{}': {}", broker_url, err);
error!("No pacts found for provider '{}' matching the given consumer version selectors in pact broker '{}': {}", provider_name, broker_url, err);
vec![
Err(err.context(format!("No pacts found matching the given consumer version selectors in pact broker '{}'", broker_url)))
Err(err.context(format!("No pacts found for provider '{}' matching the given consumer version selectors in pact broker '{}'", provider_name, broker_url)))
]
}
}
Expand Down

0 comments on commit 22745d7

Please sign in to comment.