Skip to content

Commit 4573dce

Browse files
committed
Address PR feedback
Signed-off-by: Ryan Levick <[email protected]>
1 parent e00a372 commit 4573dce

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

crates/outbound-pg/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ impl v2::HostConnection for OutboundPg {
5454
.push(
5555
build_client(&address)
5656
.await
57-
.map_err(|e| v2::Error::ConnectionFailed(format!("{:?}", e)))?,
57+
.map_err(|e| v2::Error::ConnectionFailed(format!("{e:?}")))?,
5858
)
59+
.map_err(|_| v2::Error::Other("too many connections".into()))
5960
.map(Resource::new_own)
60-
.map_err(|_| v2::Error::OtherError("too many connections".into()))
6161
}
6262
.await)
6363
}
@@ -385,6 +385,6 @@ fn to_legacy_error(error: v2::Error) -> v1::PgError {
385385
v2::Error::BadParameter(e) => v1::PgError::BadParameter(e),
386386
v2::Error::QueryFailed(e) => v1::PgError::QueryFailed(e),
387387
v2::Error::ValueConversionFailed(e) => v1::PgError::ValueConversionFailed(e),
388-
v2::Error::OtherError(e) => v1::PgError::OtherError(e),
388+
v2::Error::Other(e) => v1::PgError::OtherError(e),
389389
}
390390
}

tests/http/vault-config-test/Cargo.lock

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wit/preview2/postgres.wit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface postgres {
77
bad-parameter(string),
88
query-failed(string),
99
value-conversion-failed(string),
10-
other-error(string)
10+
other(string)
1111
}
1212

1313
/// A connection to a postgres database.

0 commit comments

Comments
 (0)