From fa1380a09b1cf5002bd67949b91be7041fa717fa Mon Sep 17 00:00:00 2001 From: Jason Spafford Date: Tue, 31 Jan 2023 12:32:45 -0500 Subject: [PATCH] Debug log CLI error if it exists (#3165) It's not easy to debug CLI errors from the RPC. You need to add a log here, but it's nicer if in verbose mode this automatically happens. --- ironfish-cli/src/command.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ironfish-cli/src/command.ts b/ironfish-cli/src/command.ts index 95962cea4b..24fc6fb837 100644 --- a/ironfish-cli/src/command.ts +++ b/ironfish-cli/src/command.ts @@ -74,6 +74,10 @@ export abstract class IronfishCommand extends Command { } catch (error: unknown) { if (hasUserResponseError(error)) { this.log(error.codeMessage) + + if (error.codeStack) { + this.sdk.logger.debug(error.codeStack) + } } else if (error instanceof ExitError) { throw error } else if (error instanceof CLIError) {