implemented feedback and fixes

This commit is contained in:
David Kagan 2023-02-27 15:55:23 -05:00
parent 7f43792146
commit efe3da453f
2 changed files with 3 additions and 1 deletions

View file

@ -120,7 +120,6 @@ func (c *Client) DatabaseByID(ctx context.Context, qdbid dax.QualifiedDatabaseID
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
// b, _ := io.ReadAll(resp.Body)
return nil, errors.Wrapf(errors.UnmarshalJSON(resp.Body), "status code: %d", resp.StatusCode)
}

View file

@ -710,6 +710,9 @@ func TestDAXIntegration(t *testing.T) {
}
})
// These tests are to test the traversal of CodedErrors across HTTP
// The client is also wrapped to maintain the integrity of the interface to prevent any
// additional methods added to the client without the appropriate tests for CodedErrors
t.Run("HTTPError", func(t *testing.T) {
mc := test.MustRunManagedCommand(t)
defer mc.Close()