Skip to content

Commit 108ac82

Browse files
authored
Extend log info and don't panic while handling stream (#11)
1 parent c6a0da0 commit 108ac82

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

protect/stream.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ func (stream *Stream) subscribe(ctx context.Context) error {
153153

154154
var hint Hint
155155
if err := json.Unmarshal(payload, &hint); err != nil {
156-
panic(fmt.Errorf("failed to unmarshal hint object error %w", err))
156+
slog.Debug("Failed to unmarshal hint object", "payload", string(payload), "err", err)
157+
continue
157158
}
158159
stream.hintsC <- hint
159160
}

0 commit comments

Comments
 (0)