From 5c858059c7fc600bf1f087d474b5a4299b696b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Skrz=C4=99tnicki?= Date: Mon, 28 Mar 2022 17:00:52 +0200 Subject: [PATCH] Assign EmitAuditEvent to err for subsequent check. (#11501) --- lib/auth/bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/bot.go b/lib/auth/bot.go index bfd01c7287537..8eafdbf173570 100644 --- a/lib/auth/bot.go +++ b/lib/auth/bot.go @@ -397,7 +397,7 @@ func (s *Server) validateGenerationLabel(ctx context.Context, user types.User, c // Emit an audit event. userMetadata := ClientUserMetadata(ctx) - if s.emitter.EmitAuditEvent(s.closeCtx, &apievents.RenewableCertificateGenerationMismatch{ + if err := s.emitter.EmitAuditEvent(s.closeCtx, &apievents.RenewableCertificateGenerationMismatch{ Metadata: apievents.Metadata{ Type: events.RenewableCertificateGenerationMismatchEvent, Code: events.RenewableCertificateGenerationMismatchCode,