Skip to content

Commit 114d389

Browse files
committed
Remove redundant error
1 parent f4029bd commit 114d389

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/billing/cloudpayments.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,10 @@ status: ${body.Status}`
692692
let workspace;
693693

694694
try {
695+
/**
696+
* If there is a workspace with subscription id then subscription was cancelled via CloudPayments admin panel (or other no garage way)
697+
* We need to remove subscription id from workspace
698+
*/
695699
workspace = await context.factories.workspacesFactory.findBySubscriptionId(body.Id);
696700
} catch (e) {
697701
const error = e as Error;
@@ -705,9 +709,10 @@ status: ${body.Status}`
705709
}
706710

707711
if (!workspace) {
708-
this.sendError(res, RecurrentCodes.SUCCESS, `[Billing / Recurrent] Workspace with subscription id ${body.Id} not found`, {
709-
body,
710-
});
712+
/**
713+
* If no workspace found by subscription id then subscription is cancelled via garage and subscription id was set to null in mutation before this hook executed
714+
* No need to send error
715+
*/
711716

712717
return;
713718
}

0 commit comments

Comments
 (0)