Skip to content

Commit

Permalink
chore: fixed error posting for invalid command payload
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jun 25, 2024
1 parent ac5c70b commit bb2a93c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/handlers/command-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export class CommandParser {
const program = new Command();
program
.command("/wallet")
.usage("<wallet>")
.argument("<wallet>", "Wallet address to query, e.g. 0x000000000000000000000000000000000000000", this._parseWalletAddress)
.action((wallet) => registerWallet(context, wallet))
.usage("<address>")
.argument("<address>", "Wallet address to query, e.g. 0x000000000000000000000000000000000000001", this._parseWalletAddress)
.action((address) => registerWallet(context, address))
.helpCommand(false)
.exitOverride()
.version(packageJson.version);
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ export async function plugin(inputs: PluginInputs, env: Env) {
} catch (e) {
if (e instanceof CommanderError) {
if (e.code !== "commander.unknownCommand") {
context.logger.fatal(e);
await context.logger.error(e.message);
}
} else {
await context.logger.error(e);
context.logger.fatal(e);
throw e;
}
}
Expand Down

0 comments on commit bb2a93c

Please sign in to comment.