Skip to content

Commit

Permalink
fix: add more error properties to support push errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Apr 26, 2023
1 parent b32529f commit b39ada3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ export abstract class SfCommand<T> 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
Expand Down Expand Up @@ -557,6 +560,7 @@ export namespace SfCommand {
exitCode?: number;
data?: unknown;
context?: string;
commandName?: string;
}
}

Expand Down

0 comments on commit b39ada3

Please sign in to comment.