From ccd898bfcceebd3a9ec881191f76f3746eb08a5a Mon Sep 17 00:00:00 2001 From: Oluwatobi Bamidele Date: Fri, 12 Jan 2024 19:35:57 +0100 Subject: [PATCH] debug: added logs to save lsat --- dist/src/controllers/lsats.js | 2 ++ dist/src/controllers/lsats.js.map | 2 +- src/controllers/lsats.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/src/controllers/lsats.js b/dist/src/controllers/lsats.js index 744b923df..e3dd033c7 100644 --- a/dist/src/controllers/lsats.js +++ b/dist/src/controllers/lsats.js @@ -114,6 +114,7 @@ function saveLsat(req, res) { return (0, res_1.failure)(res, 'invoice could not be paid'); } try { + console.log('We are trying to save LSAT, means there was a database error'); lsat.setPreimage(preimage); yield models_1.models.Lsat.create({ macaroon, @@ -129,6 +130,7 @@ function saveLsat(req, res) { return (0, res_1.success)(res, { lsat: lsat.toToken() }); } catch (e) { + logger_1.sphinxLogger.error(`Tobi logging error: ${JSON.stringify(e)}`); return (0, res_1.failure)(res, `failed to save lsat: ${e.message || e}`); } }); diff --git a/dist/src/controllers/lsats.js.map b/dist/src/controllers/lsats.js.map index 3e3bfd145..9be47ff03 100644 --- a/dist/src/controllers/lsats.js.map +++ b/dist/src/controllers/lsats.js.map @@ -1 +1 @@ -{"version":3,"file":"lsats.js","sourceRoot":"","sources":["../../../src/controllers/lsats.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAuC;AAEvC,wCAAuC;AACvC,sCAAiD;AACjD,4CAAuD;AACvD,sCAA+C;AAC/C,+CAA8C;AAC9C,4CAAoC;AAiBpC;;;;;;;;;EASE;AAEF,MAAM,sBAAsB,GAAG;IAC7B,UAAU;IACV,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,QAAQ;IACR,UAAU;IACV,YAAY;CACb,CAAA;AAED,SAAe,iBAAiB,CAAC,IAAI;;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAA;QAC1B,MAAM,KAAK,GAAmB,CAA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AC9B,GAAiB,EACjB,GAAa;;QAEb,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAA;QAC3B,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAA;QACxC,qBAAY,CAAC,IAAI,CAAC,iBAAiB,UAAU,EAAE,EAAE,gBAAO,CAAC,OAAO,CAAC,CAAA;QACjE,IAAI;YACF,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxB,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;aAC9B,CAAC,CAAA;YACF,OAAO,IAAA,aAAO,EAAC,GAAG,EAAE,2BAA2B,CAAC,CAAA;SACjD;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,IAAA,aAAO,EAAC,GAAG,EAAE,uBAAuB,CAAC,CAAA;SAC7C;IACH,CAAC;CAAA;AAfD,gCAeC"} \ No newline at end of file diff --git a/src/controllers/lsats.ts b/src/controllers/lsats.ts index 96a44425f..63c8d4b0a 100644 --- a/src/controllers/lsats.ts +++ b/src/controllers/lsats.ts @@ -155,6 +155,7 @@ export async function saveLsat( } try { + console.log('We are trying to save LSAT, means there was a database error') lsat.setPreimage(preimage) await models.Lsat.create({ macaroon, @@ -170,6 +171,7 @@ export async function saveLsat( return success(res, { lsat: lsat.toToken() }) } catch (e) { + sphinxLogger.error(`Tobi logging error: ${JSON.stringify(e)}`) return failure(res, `failed to save lsat: ${e.message || e}`) } }