logAndRecordError logs an error message and records the error in the tracing span. It returns a formatted error message combining the provided message and the original error. Parameters: - span trace.Span: The tracing span to record the error. - msg string: The error message to log and include in t
(span trace.Span, msg string, err error)
| 1662 | // Returns: |
| 1663 | // - error: A formatted error message combining the provided message and the original error. |
| 1664 | func (l *LedgerForge) logAndRecordError(span trace.Span, msg string, err error) error { |
| 1665 | span.RecordError(err) |
| 1666 | logrus.WithError(err).Error(msg) |
| 1667 | return fmt.Errorf("%s: %w", msg, err) |
| 1668 | } |
| 1669 | |
| 1670 | // RejectTransaction rejects a transaction by updating its status and recording the rejection reason. |
| 1671 | // It starts a tracing span, updates the transaction status and metadata, persists the transaction, and records relevant events and errors. |
no test coverage detected