Skip to content

Commit

Permalink
fix: log chain ID for failed attestation logs
Browse files Browse the repository at this point in the history
  • Loading branch information
byte-bandit committed Sep 20, 2024
1 parent 924d8fd commit 00dca73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion relayer/message_attester.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ func (r *Relayer) attestMessages(ctx context.Context, processors []chain.Process
err := p.ProvideEvidence(ctx, queue.FromString(queueName), messagesInQueue)
if err != nil {
logger.WithError(err).Error("error attesting messages")
if err := r.palomaClient.NewStatus().WithArg("error", err.Error()).WithLog("error attesting messages").Error(ctx); err != nil {
if err := r.palomaClient.
NewStatus().
WithChainReferenceID(p.GetChainReferenceID()).
WithArg("error", err.Error()).
WithLog("error attesting messages").
Error(ctx); err != nil {
logger.WithError(err).Error("failed to send Paloma status update")
}
return err
Expand Down

0 comments on commit 00dca73

Please sign in to comment.