Skip to content

Commit 40d88c3

Browse files
committed
self_review
1 parent 3ab10db commit 40d88c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/bencher_config/src/config_tx.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ pub enum ConfigTxError {
5252
DatabaseConnection(String, diesel::ConnectionError),
5353
#[error("Failed to parse data store: {0}")]
5454
DataStore(bencher_schema::context::DataStoreError),
55-
#[error("Failed to configure rate limits: {0}")]
56-
RateLimit(Box<bencher_schema::context::RateLimitingError>),
5755
#[error("Failed to register endpoint: {0}")]
5856
Register(dropshot::ApiDescriptionRegisterError),
5957
#[error("Failed to create server: {0}")]
@@ -65,6 +63,9 @@ pub enum ConfigTxError {
6563
#[cfg(feature = "plus")]
6664
#[error("Failed to get server ID: {0}")]
6765
ServerId(dropshot::HttpError),
66+
#[cfg(feature = "plus")]
67+
#[error("Failed to configure rate limits: {0}")]
68+
RateLimiting(Box<bencher_schema::context::RateLimitingError>),
6869
}
6970

7071
impl ConfigTx {
@@ -231,7 +232,7 @@ async fn into_context(
231232
)
232233
.await
233234
.map_err(Box::new)
234-
.map_err(ConfigTxError::RateLimit)?;
235+
.map_err(ConfigTxError::RateLimiting)?;
235236

236237
debug!(&log, "Creating API context");
237238
Ok(ApiContext {

0 commit comments

Comments
 (0)