Skip to content

Commit 598f73a

Browse files
committed
better error msg
1 parent 6a3d63e commit 598f73a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/config/src/fork_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ impl ForkConfigs {
2929
named.as_str().to_string()
3030
} else {
3131
return Err(ExtractConfigError::new(figment::Error::from(format!(
32-
"chain id '{key}' is not supported by 'alloy_chains'.",
32+
"chain id '{key}' is not supported. Check 'https://github.com/alloy-rs/chains' and consider opening a PR.",
3333
))));
3434
}
3535
} else if let Ok(named) = key.parse::<alloy_chains::NamedChain>() {
3636
named.as_str().to_string()
3737
} else {
3838
return Err(ExtractConfigError::new(figment::Error::from(format!(
39-
"chain name '{key}' is not supported by 'alloy_chains'.",
39+
"chain name '{key}' is not supported. Check 'https://github.com/alloy-rs/chains' and consider opening a PR.",
4040
))));
4141
};
4242

crates/config/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5347,7 +5347,7 @@ mod tests {
53475347

53485348
// Check the error message
53495349
assert!(err_str.contains(
5350-
"foundry config error: chain name 'randomchain' is not supported by 'alloy_chains'"
5350+
"foundry config error: chain name 'randomchain' is not supported. Check 'https://github.com/alloy-rs/chains' and consider opening a PR."
53515351
));
53525352

53535353
Ok(())
@@ -5372,7 +5372,7 @@ mod tests {
53725372
// Check the error message
53735373
assert!(
53745374
err_str.contains(
5375-
"foundry config error: chain id '0' is not supported by 'alloy_chains'"
5375+
"foundry config error: chain id '0' is not supported. Check 'https://github.com/alloy-rs/chains' and consider opening a PR."
53765376
)
53775377
);
53785378

0 commit comments

Comments
 (0)