mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-06 03:54:54 +00:00
use standard method of error handling
This commit is contained in:
parent
03eb69060f
commit
a92ffc7a42
@ -1,4 +1,4 @@
|
||||
import std/options, chronos, web3, stew/byteutils, stint, strutils, results
|
||||
import std/options, chronos, web3, stew/byteutils, stint, strutils, results, chronicles
|
||||
|
||||
import waku/incentivization/rpc
|
||||
|
||||
@ -44,5 +44,7 @@ proc isEligibleTxId*(
|
||||
defer:
|
||||
await web3.close()
|
||||
return ok()
|
||||
except ValueError as e:
|
||||
return err("Failed to fetch tx or tx receipt")
|
||||
except ValueError:
|
||||
let errorMsg = "Failed to fetch tx or tx receipt: " & getCurrentExceptionMsg()
|
||||
error "exception in isEligibleTxId", error = $errorMsg
|
||||
return err($errorMsg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user