Fix panic in non-generated API calls when printing as JSON (#1095)

Fixes #992
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-04-09 13:09:51 -04:00
1 parent 26c0c4479d
commit f05f37d0fa
8 files changed
+21 -18

No files matched your search

-1
View File
@@ -96,6 +96,5 @@ func (c *Client) Authenticate(ctx context.Context, authMethodId, command string,
return nil, apiErr
}
target.response = resp
return target, nil
}
+1 -2
View File
@@ -59,10 +59,9 @@ func (c *Client) ChangeState(ctx context.Context, authMethodId string, version u
if err != nil {
return nil, fmt.Errorf("error decoding ChangeState response: %w", err)
}
if apiErr != nil {
return nil, apiErr
}
target.response = resp
return target, nil
}