this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

dont try to stringify a nil thing (#125)

authored by

Whyrusleeping and committed by
GitHub
0ea3242f b96408df

+9 -1
+9 -1
bgs/bgs.go
··· 321 321 return &u, nil 322 322 } 323 323 324 + func stringLink(lnk *lexutil.LexLink) string { 325 + if lnk == nil { 326 + return "<nil>" 327 + } 328 + 329 + return lnk.String() 330 + } 331 + 324 332 func (bgs *BGS) handleFedEvent(ctx context.Context, host *models.PDS, env *events.XRPCStreamEvent) error { 325 333 ctx, span := otel.Tracer("bgs").Start(ctx, "handleFedEvent") 326 334 defer span.End() ··· 348 356 // TODO: if the user is already in the 'slow' path, we shouldnt even bother trying to fast path this event 349 357 350 358 if err := bgs.repoman.HandleExternalUserEvent(ctx, host.ID, u.ID, u.Did, (*cid.Cid)(evt.Prev), evt.Blocks); err != nil { 351 - log.Warnw("failed handling event", "err", err, "host", host.Host, "seq", evt.Seq, "repo", u.Did, "prev", evt.Prev.String(), "commit", evt.Commit.String()) 359 + log.Warnw("failed handling event", "err", err, "host", host.Host, "seq", evt.Seq, "repo", u.Did, "prev", stringLink(evt.Prev), "commit", evt.Commit.String()) 352 360 if !errors.Is(err, carstore.ErrRepoBaseMismatch) { 353 361 return fmt.Errorf("handle user event failed: %w", err) 354 362 }