add logging detail

This commit is contained in:
idk
2022-08-05 01:48:06 -04:00
parent 615604699a
commit 1780908fb8
2 changed files with 2 additions and 4 deletions

View File

@ -55,7 +55,7 @@ func (sam *SAMResolver) Resolve(name string) (i2pkeys.I2PAddr, error) {
if text == "RESULT=OK" {
continue
} else if text == "RESULT=INVALID_KEY" {
errStr += "Invalid key."
errStr += "Invalid key - resolver."
} else if text == "RESULT=KEY_NOT_FOUND" {
errStr += "Unable to resolve " + name
} else if text == "NAME="+name {

View File

@ -12,9 +12,7 @@ import (
"strings"
"github.com/eyedeekay/i2pkeys"
)
import (
. "github.com/eyedeekay/i2pkeys"
)
@ -259,7 +257,7 @@ func (sam *SAM) newGenericSessionWithSignatureAndPorts(style, id, from, to strin
return nil, errors.New("Duplicate destination")
} else if text == session_INVALID_KEY {
conn.Close()
return nil, errors.New("Invalid key")
return nil, errors.New("Invalid key - SAM session")
} else if strings.HasPrefix(text, session_I2P_ERROR) {
conn.Close()
return nil, errors.New("I2P error " + text[len(session_I2P_ERROR):])