Skip to content

Commit a23b317

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 619f1ee commit a23b317

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

protocol/logger/job_logger.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func (logger *WebsocketLiveloggerWithFallback) SendLog(wrapper *protocol.Timelin
198198
if currentLogger == nil {
199199
currentLogger = logger.initialize()
200200
if currentLogger == nil {
201-
return errors.New("initialize failure")
201+
return fmt.Errorf("failed to initialize live logger: no logger instance available (ForceWebsock=%t)", logger.ForceWebsock)
202202
}
203203
}
204204
err := currentLogger.SendLog(wrapper)
@@ -214,7 +214,7 @@ func (logger *WebsocketLiveloggerWithFallback) SendLog(wrapper *protocol.Timelin
214214
}
215215
currentLogger = logger.initializeVssLogger()
216216
if currentLogger == nil {
217-
return errors.New("SendLog failure")
217+
return fmt.Errorf("failed to initialize VSS logger after websocket reconnect failure: %w", err)
218218
}
219219
return currentLogger.SendLog(wrapper)
220220
}
@@ -228,7 +228,7 @@ func (logger *WebsocketLiveloggerWithFallback) SendLog(wrapper *protocol.Timelin
228228
}
229229
currentLogger = logger.initializeVssLogger()
230230
if currentLogger == nil {
231-
return errors.New("SendLog failure")
231+
return fmt.Errorf("failed to initialize VSS logger after websocket send failure: %w", err)
232232
}
233233
return currentLogger.SendLog(wrapper)
234234
}

0 commit comments

Comments
 (0)