Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Oct 4, 2023
1 parent f9f5689 commit 0a81878
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nexus/server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl NexusBackend {

async fn validate_peer<'a>(&self, peer_type: i32, peer: &Peer) -> anyhow::Result<()> {
if peer_type != 6 {
let peer_executor = self.get_peer_executor(&peer).await.map_err(|err| {
let peer_executor = self.get_peer_executor(peer).await.map_err(|err| {
PgWireError::ApiError(Box::new(PgError::Internal {
err_msg: format!("unable to get peer executor: {:?}", err),
}))
Expand Down Expand Up @@ -239,14 +239,14 @@ impl NexusBackend {
}))
})?;
if let PeerValidationResult::Invalid(validation_err) = validity {
return Err(PgWireError::UserError(Box::new(ErrorInfo::new(
Err(PgWireError::UserError(Box::new(ErrorInfo::new(
"ERROR".to_owned(),
"internal_error".to_owned(),
format!("[peer]: invalid configuration: {}", validation_err),
)))
.into());
.into())
} else {
return Ok(());
Ok(())
}
}
}
Expand Down

0 comments on commit 0a81878

Please sign in to comment.