Skip to content

Commit

Permalink
Fix misleading config error to do with connection configs (#2444)
Browse files Browse the repository at this point in the history
### Description

If you don't specify a connection config, atm the error message says
you're missing the `domain`. I ran into this previously and found it
hard to debug; a validator operator in discord also ran into this

### Drive-by changes

n/a

### Related issues

n/a

### Backward compatibility

_Are these changes backward compatible?_

Yes

_Are there any infrastructure implications, e.g. changes that would
prohibit deploying older commits using this infra tooling?_

None


### Testing

_What kind of testing have these changes undergone?_

None
  • Loading branch information
tkporter authored Jun 29, 2023
1 parent fcb1beb commit 8e8e472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/hyperlane-base/src/settings/chains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ impl FromRawConf<'_, RawChainConf> for ChainConf {

let domain = connection
.as_ref()
.ok_or_else(|| eyre!("Missing `domain` configuration"))
.take_err(&mut err, || cwp + "domain")
.ok_or_else(|| eyre!("Missing `connection` configuration"))
.take_err(&mut err, || cwp + "connection")
.and_then(|c: &ChainConnectionConf| {
let protocol = c.protocol();
let domain_id = raw
Expand Down

0 comments on commit 8e8e472

Please sign in to comment.