Skip to content

fix(purchase): follow-ups to the provider error summaries (value slots, failure email, Azure 422 text, docs) #1748

Open

Description

@cristim

Summary

Follow-ups from the reviews of #1739 (provider error summaries on the exchange, marketplace, refund and collection paths). None of these blocked the merge.

  • Quoted value slots. shortValuePattern in internal/purchase/errnotes.go accepts any short token in the quoted slots of allowlisted notes, such as a reserved ceiling or an unknown provider name. That includes dotted-quad IPs, 12-digit numbers and dotted host names. Today those values come from CUDly's own config and database, but limiting the slot to the value's real shape would keep a future writer from showing something else.
  • Purchase-failed email. The failure email's Detail field carries the raw execution error. It should use the category message and the execution reference, like the API responses.
  • Azure 422 refusal text. An Azure policy refusal returned as 422 passes the provider's policy text through. It should use a fixed message, with the provider text in the server log.
  • Stale doc comments. A few comments still describe the old pass-through behaviour of the error helpers. Update them to match the closed-note model.

Related

#1688, #1702, #1721.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions