Skip to content

fix(api): Azure revoke quote endpoint returns 0/"" when Azure omits the refund amount (misleading dialog) #447

Closed

Description

@cristim

From the review of #445 (closes #96). extractAzureRefundQuote (internal/api/handler_purchases_revoke.go ~529-543) fills 0/"" when Azure omits BillingRefundAmount, so the confirm dialog says 'Azure will refund 0.00 .' and the POST then gets a 400 (it fails closed, but the text is misleading). Return 422 from calculateAzureRevoke when amount or currency is missing, and reuse that one extractor in azureCalculateRefund (the parsing is duplicated today). This also removes the frontend nit at history.ts ~1432, where a null refund_amount throws before the dialog opens.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions