Le sigh. "I don't wrap errors and so I don't know where my errors come from."
The code that justifies the special context handling:
if err := chargePayment(ctx, orderID); err != nil {
cancel(fmt.Errorf(
"order %s: payment failed: %w", orderID, err,
))
return err
}
Why not simply wrap that error with the same information?
I have the same question, I am confused by the premise of this article. Now you're recording everything twice?