Skip to content

Commit 8547958

Browse files
Add sending error (#452)
* Add sending error * Bump version up to 1.1.4 * Update cloudPaymentsApi.ts * Lint --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b41d614 commit 8547958

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"main": "index.ts",
55
"license": "UNLICENSED",
66
"scripts": {

src/billing/cloudpayments.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,10 @@ export default class CloudPaymentsWebhooks {
584584
}
585585

586586
if (!workspace) {
587+
this.sendError(res, RecurrentCodes.SUCCESS, `[Billing / Recurrent] Workspace with subscription id ${body.Id} not found`, {
588+
body,
589+
});
590+
587591
return;
588592
}
589593

src/utils/cloudPaymentsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class CloudPaymentsApi {
181181
});
182182

183183
if (!result.data.Success) {
184-
throw new Error(`Error during cancelling transaction: ${result.data.Message}`);
184+
throw new Error(`Error during cancelling transaction with id ${transactionId}: ${result.data.Message}`);
185185
}
186186
}
187187
}

0 commit comments

Comments
 (0)