From 7a0265d33324e2714901b4aff2d39ff55c6cba94 Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Fri, 8 Mar 2019 11:16:33 +0100 Subject: [PATCH] fix(core): missing detail in error.log for non-Garden exceptions --- garden-service/src/exceptions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/garden-service/src/exceptions.ts b/garden-service/src/exceptions.ts index 8cdd861f0a..0d5644f5f7 100644 --- a/garden-service/src/exceptions.ts +++ b/garden-service/src/exceptions.ts @@ -6,6 +6,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +import { omit } from "lodash" + export interface GardenError { type: string message: string @@ -27,7 +29,7 @@ export function toGardenError(err: Error | GardenError): GardenError { if (err instanceof GardenBaseError) { return err } else { - const out = new RuntimeError(err.message, {}) + const out = new RuntimeError(err.message, omit(err, ["message"])) out.stack = err.stack return out }