Skip to content

Refund-then-email in one try risks double-refund on retry #13

Description

@royalpinto007

Problem

createRefund then sendReply share one try/catch reporting "Retry or handle manually": money already moved but the caller is told to retry, risking a double refund.

Where

lib/execute.ts (shared try around refund + email).

Acceptance

Add a failing test first with refund-OK/email-throw, asserting the result distinguishes "refund done, email failed" from retryable failure. Then fix.

Activity

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