gonduit
gonduit copied to clipboard
Provide the response body with unsucessful responses
This should help with debugging: etcinit/phabulous#27
Not sure this was a complete fix. For example when running:
client, err := gonduit.Dial("REDACTED", &core.ClientOptions{
APIToken: "api-REDACTED",
})
Results in the error logged to console:
(*json.UnmarshalTypeError)(0xc8203d0210)(json: cannot unmarshal object into Go value of type []interface {})
This is because the response from phab is not an array:
{"result":{"authentication":["..."],"signatures":["..."],"input":["..."],"output":["..."]},"error_code":null,"error_info":null}
Let me know if you need more info to diagnose. I simply commented out the spew.Dump
line as it still functions correctly.
Yep, looking at the code it seems I accidentally left in the spew.Dump
call, which I was probably using for debugging.