Log sui errors (#951)

* log sui errors

* fix precommit
This commit is contained in:
Jayant Krishnamurthy 2023-07-13 15:41:29 -07:00 committed by GitHub
parent e3fe85c312
commit aa76c15d1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@pythnetwork/price-pusher",
"version": "5.4.4",
"version": "5.4.5",
"description": "Pyth Price Pusher",
"homepage": "https://pyth.network",
"main": "lib/index.js",

View File

@ -322,7 +322,7 @@ export class SuiPricePusher implements IPricePusher {
"Successfully updated price with transaction digest ",
result.digest
);
} catch (e) {
} catch (e: any) {
console.log("Error when signAndExecuteTransactionBlock");
if (String(e).includes("GasBalanceTooLow")) {
console.warn(
@ -332,6 +332,11 @@ export class SuiPricePusher implements IPricePusher {
nextGasObject = gasObject;
}
console.error(e);
if ("data" in e) {
console.error("Error has .data field:");
console.error(JSON.stringify(e.data));
}
}
if (nextGasObject !== undefined) {

View File

@ -100,4 +100,4 @@ module pyth::set_stale_price_threshold_test {
pyth_tests::cleanup_worm_state_pyth_state_and_clock(worm_state, pyth_state, clock);
test_scenario::end(scenario);
}
}
}