Skip to content

Commit

Permalink
fix(exception): need continue match filter when code filter not found (
Browse files Browse the repository at this point in the history
  • Loading branch information
noahziheng authored Dec 5, 2022
1 parent 3b4deac commit 02e6a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exception/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const matchExceptionFilterClazz = (err: Error, container: Container): Co
return null;
}
let targetFilterClazz: Constructable<ExceptionFilterType> | 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<Error>)) {
Expand Down

0 comments on commit 02e6a28

Please sign in to comment.