From 0d76e2b86abc33456d179738cc418f247a1ba6d5 Mon Sep 17 00:00:00 2001 From: Gorbachev Egor <7gorbachevm@gmail.com> Date: Thu, 2 Nov 2023 19:01:45 +0700 Subject: [PATCH] More detailed error --- functions/lib/handle-error/handle-error.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/lib/handle-error/handle-error.ts b/functions/lib/handle-error/handle-error.ts index 05cdef70..5945fc1a 100644 --- a/functions/lib/handle-error/handle-error.ts +++ b/functions/lib/handle-error/handle-error.ts @@ -17,6 +17,8 @@ const reportErrorToTelegram = (error: unknown, env: unknown) => { message: (error as Error)?.message, name: (error as Error)?.name, stack: (error as Error)?.stack, + isDatabaseException: error && error instanceof DatabaseException, + isZodError: error && error instanceof ZodError, ...Object.getOwnPropertyNames(error), }