feat: improved error messages for cloud- or oss-only commands (#140)

* feat: set logging info for cloud- or oss-only commands

* fix: add cloud-only to BucketSchemasApi

* fix: api-only flagging and %w for return error wrapping

* fix: keep the model assignment
This commit is contained in:
William Baker
2021-06-23 10:41:35 -04:00
committed by GitHub
parent a3408e031a
commit d519890f03
36 changed files with 1648 additions and 408 deletions

View File

@ -83,7 +83,9 @@ type APIClient struct {
}
type service struct {
client *APIClient
client *APIClient
isOnlyOSS bool
isOnlyCloud bool
}
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
@ -413,7 +415,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
}
return nil
}
return errors.New("undefined response type")
return fmt.Errorf("unable to decode response content type %q", contentType)
}
// Add a file to the multipart request