From b468f955e118a39226d4371e4560e6e77b2f68e7 Mon Sep 17 00:00:00 2001 From: Ulad Kasach Date: Sun, 26 May 2024 15:42:32 -0400 Subject: [PATCH] fix(debug): explicitly log introspection errors --- .../extractDomainObjectMetadatasFromConfigCriteria.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/logic/config/getConfig/extractDomainObjectMetadatasFromConfigCriteria.ts b/src/logic/config/getConfig/extractDomainObjectMetadatasFromConfigCriteria.ts index a5fe972..cb86243 100644 --- a/src/logic/config/getConfig/extractDomainObjectMetadatasFromConfigCriteria.ts +++ b/src/logic/config/getConfig/extractDomainObjectMetadatasFromConfigCriteria.ts @@ -10,7 +10,14 @@ export const extractDomainObjectMetadatasFromConfigCriteria = async ({ exclude: string[] | null; }) => { // grab the metadata of the domain objects specified in those search paths - const metadatas = introspect(searchPaths); + const metadatas = (() => { + try { + return introspect(searchPaths); + } catch (error) { + console.error(error); + throw error; + } + })(); // if "include" is specified, include only the ones that are explicitly defined in the list; DEFAULT = all of them const metadatasAfterInclusion = include