Skip to content

Commit 619f1ee

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

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

protocol/logger/job_logger.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,17 @@ func (logger *WebsocketLiveloggerWithFallback) Initialize() {
157157

158158
type errorLogger struct{}
159159

160+
// ErrMissingLoggerConnection is returned when a log is sent without an active logger connection.
161+
var ErrMissingLoggerConnection = errors.New("missing logger connection")
162+
160163
// Close implements [LiveLogger].
161164
func (e *errorLogger) Close() error {
162165
return nil
163166
}
164167

165168
// SendLog implements [LiveLogger].
166169
func (e *errorLogger) SendLog(lines *protocol.TimelineRecordFeedLinesWrapper) error {
167-
return errors.New("missing Logger Connection")
170+
return ErrMissingLoggerConnection
168171
}
169172

170173
func makePointer[T any](p T) *T {

0 commit comments

Comments
 (0)