From 973063276e7ab302be51d2c8bd0bc35067df912a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 21 Apr 2022 11:53:27 -0600 Subject: [PATCH] Rethrow error when entity save fails This will provide the full context on why the save failed, even if tests are running with `--silent`. --- src/entity-factory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity-factory.ts b/src/entity-factory.ts index 75cc13d0..27de4f54 100644 --- a/src/entity-factory.ts +++ b/src/entity-factory.ts @@ -49,7 +49,7 @@ export class EntityFactory { } catch (error) { const message = 'Could not save entity' printError(message, error) - throw new Error(message) + throw error; } } else { const message = 'No db connection is given'