From 9052596bbf8428d0efa2d736eca9fad3a60ea0e0 Mon Sep 17 00:00:00 2001 From: leonz789 Date: Fri, 27 Dec 2024 09:04:46 +0800 Subject: [PATCH] wrap error --- fetcher/chainlink/chainlink.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetcher/chainlink/chainlink.go b/fetcher/chainlink/chainlink.go index af883f9..a448212 100644 --- a/fetcher/chainlink/chainlink.go +++ b/fetcher/chainlink/chainlink.go @@ -66,7 +66,7 @@ func isContractAddress(addr string, client *ethclient.Client) bool { func (s *source) reload(cfgPath string, token string) error { cfg, err := parseConfig(cfgPath) if err != nil { - return errors.New("failed to parse config file") + return fmt.Errorf("failed to parse config file, error:%w", err) } // add new network from config file for network, url := range cfg.URLs {