Fix account error handler (#2795)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-03-21 21:32:41 +06:00 committed by GitHub
parent d770acb77a
commit a221b19487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -924,7 +924,7 @@ function wrap (f: (db: Db, productId: string, ...args: any[]) => Promise<any>):
.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, {})
}