(result Result, authSnapshot *Auth)
| 48 | } |
| 49 | |
| 50 | func (m *Manager) publishErrorEvent(result Result, authSnapshot *Auth) { |
| 51 | if m == nil || result.Success || authSnapshot == nil || m.HomeEnabled() { |
| 52 | return |
| 53 | } |
| 54 | payload, ok := buildErrorEventPayload(result, authSnapshot) |
| 55 | if !ok { |
| 56 | return |
| 57 | } |
| 58 | redisqueue.EnqueueError(payload) |
| 59 | } |
| 60 | |
| 61 | func buildErrorEventPayload(result Result, authSnapshot *Auth) ([]byte, bool) { |
| 62 | if authSnapshot == nil || result.Success { |
no test coverage detected