Skip to content

Commit

Permalink
fix: don't show stack trace when entered an invalid password to wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Aug 13, 2022
1 parent 70ceb67 commit 8d24bec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/CliError.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { InvalidPasswordError } from '@aeternity/aepp-sdk';

export default class CliError extends Error {
constructor(message) {
super(message);
Expand All @@ -11,6 +13,7 @@ export async function runProgram(program) {
} catch (error) {
if (
error instanceof CliError
|| error instanceof InvalidPasswordError
|| error.code === 'ENOENT'
) {
program.error(error.message);
Expand Down

0 comments on commit 8d24bec

Please sign in to comment.