I'm actually facing an issue trying to create a node using ACH-US login.
Here is the request i'm doing
body := `{
"type": "ACH-US",
"info":{
"bank_id":"synapse_good",
"bank_pw":"test1234",
"bank_name":"fake"
}
}`
node, err := user.CreateNode(body)
panic: interface conversion: interface {} is nil, not map[string]interface {} [recovered]
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 6 [running]:
testing.tRunner.func1(0xc0000d2200)
C:/Go/src/testing/testing.go:792 +0x38e
panic(0x7dd880, 0xc000060f30)
C:/Go/src/runtime/panic.go:513 +0x1c7
github.com/SynapseFI/SynapseGo.handleHTTPError(0xc000302000, 0x119, 0x600, 0x0, 0xc0002c8000)
D:/dev/go/pkg/mod/github.com/!synapse!f!i/[email protected]/error.go:213 +0x22a
github.com/SynapseFI/SynapseGo.(*Request).Post(0xc0001e9c68, 0xc000342e10, 0x47, 0x85e386, 0x75, 0x0, 0x0, 0x0, 0x570000c00000edc0, 0x32, ...)
D:/dev/go/pkg/mod/github.com/!synapse!f!i/[email protected]/request.go:88 +0x59d
github.com/SynapseFI/SynapseGo.(*User).do(0xc0001e9c20, 0x848339, 0x4, 0xc000342e10, 0x47, 0x85e386, 0x75, 0x0, 0x0, 0x0, ...)
D:/dev/go/pkg/mod/github.com/!synapse!f!i/[email protected]/users.go:43 +0x654
github.com/SynapseFI/SynapseGo.(*User).do(0xc0001e9c20, 0x848339, 0x4, 0xc000342e10, 0x47, 0x85e386, 0x75, 0x0, 0x0, 0x0, ...)
D:/dev/go/pkg/mod/github.com/!synapse!f!i/[email protected]/users.go:62 +0x530
github.com/SynapseFI/SynapseGo.(*User).CreateNode(0xc0001e9c20, 0x85e386, 0x75, 0x0, 0x0, 0x0, 0x0, 0x2f7, 0x501870)
func handleHTTPError(d []byte) error {
data := readStream(d)
errCode := data["error_code"].(string)
httpCode := data["http_code"].(string)
msg := data["error"].(map[string]interface{})["en"].(string)
return handleAPIError(errCode, httpCode, msg)
}