Skip to content

Guard against missing payments in the refund tool - #24

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/refund-missing-payment-check
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/refund-missing-payment-check

Conversation

@sentry

@sentry sentry Bot commented Oct 16, 2026

Copy link
Copy Markdown

Fixes a TypeError in /api/chat when attempting to refund orders placed prior to the payments launch.

  • Update selectPayment return type to Promise<Payment | undefined> and remove the unsafe cast.
  • Add a null check on payment in refundOrder before reading payment.chargeId, gracefully returning an unrefunded status if no payment row exists.

Fixes DEBUGGING-AGENTS-STOREFRONT-6

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants