From ecc9652c2873255fc989a9249e955aeffe9a4065 Mon Sep 17 00:00:00 2001 From: Fabio Lama Date: Thu, 29 Sep 2022 14:31:02 +0000 Subject: [PATCH] make error more explicit --- charts/polkadot-registrar-watcher/Chart.yaml | 4 ++-- src/subscriber/subscriber.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/polkadot-registrar-watcher/Chart.yaml b/charts/polkadot-registrar-watcher/Chart.yaml index 0f1bb3c..b68ab6a 100644 --- a/charts/polkadot-registrar-watcher/Chart.yaml +++ b/charts/polkadot-registrar-watcher/Chart.yaml @@ -1,5 +1,5 @@ description: Polkadot Watcher name: polkadot-registrar-watcher -version: v0.4.0 -appVersion: v0.4.0 +version: v0.4.1 +appVersion: v0.4.1 apiVersion: v2 diff --git a/src/subscriber/subscriber.ts b/src/subscriber/subscriber.ts index a44986e..b306b82 100644 --- a/src/subscriber/subscriber.ts +++ b/src/subscriber/subscriber.ts @@ -270,32 +270,32 @@ export class Subscriber implements ISubscriber { switch (field.accountTy) { case "legal_name": if (field.value != info.legal.toHuman()) { - throw new Error("Verified legal name does not mache on-chain value"); + throw new Error(`Verified legal name does not mache on-chain value. Expected ${field.value}, found: ${info.legal.toHuman()}`); } break; case "display_name": if (field.value != info.display.toHuman()) { - throw new Error("Verified display name does not mache on-chain value"); + throw new Error(`Verified display name does not mache on-chain value. Expected ${field.value}, found: ${info.display.toHuman()}`); } break; case "email": if (field.value != info.email.toHuman()) { - throw new Error("Verified email does not mache on-chain value"); + throw new Error(`Verified email does not mache on-chain value. Expected ${field.value}, found: ${info.email.toHuman()}`); } break; case "twitter": if (field.value != info.twitter.toHuman()) { - throw new Error("Verified twitter does not mache on-chain value"); + throw new Error(`Verified twitter does not mache on-chain value. Expected ${field.value}, found: ${info.twitter.toHuman()}`); } break; case "matrix": if (field.value != info.riot.toHuman()) { - throw new Error("Verified matrix does not mache on-chain value"); + throw new Error(`Verified matrix does not mache on-chain value. Expected ${field.value}, found: ${info.riot.toHuman()}`); } break; case "web": if (field.value != info.web.toHuman()) { - throw new Error("Verified web does not mache on-chain value"); + throw new Error(`Verified web does not mache on-chain value. Expected ${field.value}, found: ${info.web.toHuman()}`); } break; default: