From a221b1948791936af16397bfa7a3947c487c045e Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Tue, 21 Mar 2023 21:32:41 +0600 Subject: [PATCH] Fix account error handler (#2795) Signed-off-by: Denis Bykhov --- server/account/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/account/src/index.ts b/server/account/src/index.ts index 09a1a36885..47b55d616c 100644 --- a/server/account/src/index.ts +++ b/server/account/src/index.ts @@ -924,7 +924,7 @@ function wrap (f: (db: Db, productId: string, ...args: any[]) => Promise): .then((result) => ({ id: request.id, result })) .catch((err) => { console.error(err) - if (err.status.code === platform.status.ExpiredLink) { + if (err.status?.code === platform.status.ExpiredLink) { return { error: new Status(Severity.ERROR, platform.status.ExpiredLink, {}) }