You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add nil check for Kubernetes client in EmitMessage to prevent panic when
client is uninitialized. This fixes a crash that occurs during error
handling in GitLab provider when 401 errors are encountered.
The EventEmitter now gracefully handles three nil scenarios:
- nil repo: skips event creation, continues logging
- nil logger: skips logging, continues event creation
- nil client: skips event creation, continues logging
Added comprehensive test coverage for nil client scenario to match
existing tests for nil repo and nil logger cases.
Fixes crash: runtime error: invalid memory address or nil pointer
dereference at pkg/events/emit.go:36
Jira: https://issues.redhat.com/browse/SRVKP-8910
Assisted-by: Claude-Sonnet-4.5 (via Claude Code)
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
0 commit comments