From bbd0404ed7267f0a9b1a29601859b04c21c38d50 Mon Sep 17 00:00:00 2001 From: Noah Gao Date: Mon, 5 Dec 2022 20:08:43 +0800 Subject: [PATCH] fix(exception): need continue match filter when code filter not found --- src/exception/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exception/utils.ts b/src/exception/utils.ts index d5c7512..f68ed04 100644 --- a/src/exception/utils.ts +++ b/src/exception/utils.ts @@ -12,7 +12,7 @@ export const matchExceptionFilterClazz = (err: Error, container: Container): Co return null; } let targetFilterClazz: Constructable | null = null; - if (err instanceof ArtusStdError) { + if (err instanceof ArtusStdError && filterMap.has(err.code)) { // handle ArtusStdError with code simply targetFilterClazz = filterMap.get(err.code); } else if (filterMap.has(err['constructor'] as Constructable)) {