Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelu2016 committed Mar 19, 2024
1 parent f6bb5ad commit 12c1f40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,14 @@ func (h *Handler) handleValidationResult(kc *key.ResponseKey, cost float64) erro
if err != nil {
stats.Incr("bricksllm.message.handler.handle_validation_result.handle_validation_result", nil, 1)

if _, ok := err.(expirationError); ok {
if xe, ok := err.(expirationError); ok {
stats.Incr("bricksllm.message.handler.handle_validation_result.expiraton_error", nil, 1)

h.log.Debug("expiration error",
zap.String("expired_reason", xe.Reason()),
zap.String("key_id", kc.KeyId),
)

truePtr := true
_, err = h.km.UpdateKey(kc.KeyId, &key.UpdateKey{
Revoked: &truePtr,
Expand Down

0 comments on commit 12c1f40

Please sign in to comment.