Skip to content

Commit b18f8d2

Browse files
committed
chore: remove error increment counted twice
1 parent e70bf10 commit b18f8d2

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

core/service/src/engine/threshold/service/crs_generator.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ use kms_grpc::{
1212
use observability::{
1313
metrics,
1414
metrics_names::{
15-
ERR_CANCELLED, ERR_CRS_GEN_FAILED, ERR_INVALID_REQUEST, OP_CRS_GEN_REQUEST,
16-
OP_INSECURE_CRS_GEN_REQUEST, TAG_PARTY_ID,
15+
ERR_CANCELLED, ERR_CRS_GEN_FAILED, OP_CRS_GEN_REQUEST, OP_INSECURE_CRS_GEN_REQUEST,
16+
TAG_PARTY_ID,
1717
},
1818
};
1919
use threshold_fhe::{
@@ -185,9 +185,7 @@ impl<
185185
guarded_meta_store.insert(&req_id)?;
186186
}
187187

188-
let session_id = req_id.derive_session_id().inspect_err(|_| {
189-
metrics::METRICS.increment_error_counter(op_tag, ERR_INVALID_REQUEST);
190-
})?;
188+
let session_id = req_id.derive_session_id()?;
191189
// CRS ceremony requires a sync network
192190
let session = self
193191
.session_preparer

core/service/src/engine/threshold/service/public_decryptor.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ impl<
281281
request_id = ?inner.request_id,
282282
"Failed to validate decrypt request"
283283
);
284-
let _ = metrics::METRICS.increment_error_counter(
285-
OP_PUBLIC_DECRYPT_REQUEST,
286-
ERR_PUBLIC_DECRYPTION_FAILED,
287-
);
288284
})?;
289285

290286
// Do some checks before we start modifying the database

core/service/src/engine/threshold/service/user_decryptor.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,6 @@ impl<
442442
"Failed to validate decrypt request {}",
443443
format_user_request(&inner)
444444
);
445-
let _ = metrics::METRICS
446-
.increment_error_counter(OP_USER_DECRYPT_REQUEST, ERR_USER_DECRYPTION_FAILED);
447445
})?;
448446

449447
timer.tags([(TAG_KEY_ID, key_id.as_str())]);

0 commit comments

Comments
 (0)