From 70e31777a45fc6c84d5ef1697f08770dafe93358 Mon Sep 17 00:00:00 2001 From: Georgy Berezhnoy Date: Thu, 26 Aug 2021 03:36:12 +0300 Subject: [PATCH] Fix catcher problems --- package.json | 2 +- src/billing/cloudpayments.ts | 8 ++++---- yarn.lock | 39 ++++++++++++------------------------ 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 7092a835..b6d4bd82 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "typescript": "^3.7.5" }, "dependencies": { - "@hawk.so/nodejs": "^2.2.0", + "@hawk.so/nodejs": "^3.0.10", "@types/amqp-connection-manager": "^2.0.4", "@types/debug": "^4.1.5", "@types/escape-html": "^1.0.0", diff --git a/src/billing/cloudpayments.ts b/src/billing/cloudpayments.ts index fec1d1bf..2d9e55b5 100644 --- a/src/billing/cloudpayments.ts +++ b/src/billing/cloudpayments.ts @@ -20,10 +20,10 @@ import { BankCard, BusinessOperationStatus, BusinessOperationType, - ConfirmedMemberDBScheme, + ConfirmedMemberDBScheme, Json, PayloadOfWorkspacePlanPurchase, PlanDBScheme, - PlanProlongationPayload + PlanProlongationPayload, } from 'hawk.types'; import { AccountType, Currency, PENNY_MULTIPLIER } from 'codex-accounting-sdk'; import WorkspaceModel from '../models/workspace'; @@ -249,7 +249,7 @@ export default class CloudPaymentsWebhooks { telegram.sendMessage(`✅ [Billing / Check] All checks passed successfully «${workspace.name}»`, TelegramBotURLs.Money) .catch(e => console.error('Error while sending message to Telegram: ' + e)); - HawkCatcher.send(new Error('[Billing / Check] All checks passed successfully'), body); + HawkCatcher.send(new Error('[Billing / Check] All checks passed successfully'), body as any); res.json({ code: CheckCodes.SUCCESS, @@ -499,7 +499,7 @@ export default class CloudPaymentsWebhooks { this.handleSendingToTelegramError(telegram.sendMessage(`✅ [Billing / Fail] Transaction failed for «${workspace.name}»`, TelegramBotURLs.Money)); - HawkCatcher.send(new Error('[Billing / Fail] Transaction failed'), body); + HawkCatcher.send(new Error('[Billing / Fail] Transaction failed'), body as any); res.json({ code: FailCodes.SUCCESS, diff --git a/yarn.lock b/yarn.lock index 705bda0a..05391d6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -356,14 +356,22 @@ dependencies: "@f/map-obj" "^1.2.2" -"@hawk.so/nodejs@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@hawk.so/nodejs/-/nodejs-2.2.0.tgz#d72f028b2b39eaf6ac1a8b5f711ab9faa7649cb3" - integrity sha512-6QdzhfNfzEEmkHzW3ApfGAbl4Ri8P68ezHqHgzToGVN/42SeC/wWX21hR69BrXSfMloK/33AH+Be/luNY388Ug== +"@hawk.so/nodejs@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@hawk.so/nodejs/-/nodejs-3.0.10.tgz#11e34f2572f53088913b1d45e3abfaa391386904" + integrity sha512-KpVk34n6ttX21KEJlGmKi7Pg4bh+x3x1Ot8O1Xy4ZRb+ob208PU/ThDEOeJgf/QH3QBTTNnNWK/HvjSW81TkHg== dependencies: - axios "^0.19.2" + "@hawk.so/types" "^0.1.15" + axios "^0.21.1" stack-trace "^0.0.10" +"@hawk.so/types@^0.1.15": + version "0.1.15" + resolved "https://registry.yarnpkg.com/@hawk.so/types/-/types-0.1.15.tgz#9a561dda47fab91f3093e32cbdfaf83b1eb000c1" + integrity sha512-LHZdjmyIbAQ+0Og9Px34BTYF5YM0fto9bSluONmgVVr6Ctu2nPqPibNF1s9PEEisrtRxzuUQX8ea/OAmOJhK3w== + dependencies: + "@types/mongodb" "^3.5.34" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -1706,13 +1714,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@^0.19.2: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== - dependencies: - follow-redirects "1.5.10" - axios@^0.20.0: version "0.20.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.20.0.tgz#057ba30f04884694993a8cd07fa394cff11c50bd" @@ -2559,13 +2560,6 @@ debug@4.1.1: dependencies: ms "^2.1.1" -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^3.2.6: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -3436,13 +3430,6 @@ fn-args@5.0.0: resolved "https://registry.yarnpkg.com/fn-args/-/fn-args-5.0.0.tgz#7a18e105c8fb3bf0a51c30389bf16c9ebe740bb3" integrity sha512-CtbfI3oFFc3nbdIoHycrfbrxiGgxXBXXuyOl49h47JawM1mYrqpiRqnH5CB2mBatdXvHHOUO6a+RiAuuvKt0lw== -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - follow-redirects@^1.10.0: version "1.13.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147"