Skip to content

Commit

Permalink
fix: remove error handler for endpoint file
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Jan 2, 2025
1 parent 4491978 commit 4c75760
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/algod/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"time"
)

const AlgodNetEndpointFileMissingAddress = "missing://endpoint"

type DataFolderConfig struct {
Path string `json:"path"`
Token string `json:"token"`
Expand All @@ -36,10 +38,7 @@ func ToDataFolderConfig(path string) (DataFolderConfig, error) {
return dataFolderConfig, err
}

Check warning on line 39 in internal/algod/utils/utils.go

View check run for this annotation

Codecov / codecov/patch

internal/algod/utils/utils.go#L38-L39

Added lines #L38 - L39 were not covered by tests

dataFolderConfig.Endpoint, err = GetEndpointFromDataDir(path)
if err != nil {
return dataFolderConfig, err
}
dataFolderConfig.Endpoint, _ = GetEndpointFromDataDir(path)
dataFolderConfig.PID, _ = GetPidFromDataDir(path)

return dataFolderConfig, nil
Expand Down Expand Up @@ -153,7 +152,7 @@ func GetEndpointFromDataDir(path string) (string, error) {
var endpoint string
file, err := os.ReadFile(path + "/algod.net")
if err != nil {
return endpoint, err
return AlgodNetEndpointFileMissingAddress, nil
}

endpoint = "http://" + ReplaceEndpointUrl(string(file))
Expand Down

0 comments on commit 4c75760

Please sign in to comment.