code: func (ra *RegistrationAuthorityImpl) failOrder(
  	ctx context.Context,
  	order *corepb.Order,
  	prob *probs.ProblemDetails) *corepb.Order {
  
  	// Convert the problem to a protobuf problem for the *corepb.Order field
  	pbProb, err := bgrpc.ProblemDetailsToPB(prob)
  	if err != nil {
  		ra.log.AuditErrf("Could not convert order error problem to PB: %q", err)
  		return order
  	}
  
  	// Assign the protobuf problem to the field and save it via the SA
  	order.Error = pbProb
  	if err := ra.SA.SetOrderError(ctx, order); err != nil {
  		ra.log.AuditErrf("Could not persist order error: %q", err)
  	}
  	return order
  }
docs: // failOrder marks an order as failed by setting the problem details field of
  // the order & persisting it through the SA. If an error occurs doing this we
  // log it and return the order as-is. There aren't any alternatives if we can't
  // add the error to the order.