Skip to content

Commit 33a7148

Browse files
authoredFeb 11, 2025··
graph init: Improve error reporting (#1960)
* show error on abi fetch fail * changeset
1 parent ef2957e commit 33a7148

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎.changeset/yellow-jobs-brake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
`graph init`: improve error reporting

‎packages/cli/src/commands/init.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default class InitCommand extends Command {
231231
? sourcifyContractInfo.abi
232232
: await contractService.getABI(ABI, network, fromContract!);
233233
} catch (e) {
234-
this.exit(1);
234+
this.error(`Failed to get ABI: ${e.message}`, { exit: 1 });
235235
}
236236
}
237237
}

0 commit comments

Comments
 (0)
Please sign in to comment.