diff --git a/service/client.go b/service/client.go index c8f797d..202196f 100644 --- a/service/client.go +++ b/service/client.go @@ -80,5 +80,10 @@ func (c *Client) Do(request Request) (string, error) { return "", fmt.Errorf("status %s, details %v", code, respErr.Error) } - return string(msg.Data), nil + var resp ResponseMessage + if err := json.Unmarshal(msg.Data, &resp); err != nil { + return "", err + } + + return resp.Details, nil }