From b39ada36d2df142f18363951f38c84758ed9bb6e Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Wed, 26 Apr 2023 17:03:15 -0600 Subject: [PATCH] fix: add more error properties to support push errors --- src/sfCommand.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sfCommand.ts b/src/sfCommand.ts index a4560bcc3..d0a73f4c7 100644 --- a/src/sfCommand.ts +++ b/src/sfCommand.ts @@ -445,6 +445,9 @@ export abstract class SfCommand extends Command { code: codeFromError, // @ts-expect-error because context is not on Error context: (error.context as string) ?? null, + commandName: (error as SfCommand.Error).commandName ?? null, + // @ts-expect-error because result is not on Error + result: (error.result as unknown) ?? null, }); // Create printable error object @@ -557,6 +560,7 @@ export namespace SfCommand { exitCode?: number; data?: unknown; context?: string; + commandName?: string; } }