Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fix: call on error exists with 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Feb 9, 2024
1 parent 63cd89e commit 3fab71b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/contract/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ async function scheduleFunctionCall(options) {
case '{"ExecutionError":"Exceeded the prepaid gas."}': {
console.log(chalk(`\nTransaction ${error.transaction_outcome.id} had ${options.gas} of attached gas but used ${error.transaction_outcome.outcome.gas_burnt} of gas`));
console.log('View this transaction in explorer:', chalk.blue(`https://explorer.${options.networkId}.near.org/transactions/${error.transaction_outcome.id}`));
process.exit(1);
break;
}
default: {
console.log(error);
throw error;
}
}
}
Expand Down

0 comments on commit 3fab71b

Please sign in to comment.