another servers v2 error type
diff --git a/openstack/compute/v2/servers/requests.go b/openstack/compute/v2/servers/requests.go
index 488829e..4c26a68 100644
--- a/openstack/compute/v2/servers/requests.go
+++ b/openstack/compute/v2/servers/requests.go
@@ -3,7 +3,6 @@
import (
"encoding/base64"
"encoding/json"
- "errors"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/compute/v2/flavors"
@@ -772,7 +771,10 @@
// ToMetadatumCreateMap assembles a body for a Create request based on the contents of a MetadataumOpts.
func (opts MetadatumOpts) ToMetadatumCreateMap() (map[string]interface{}, string, error) {
if len(opts) != 1 {
- return nil, "", errors.New("CreateMetadatum operation must have 1 and only 1 key-value pair.")
+ err := gophercloud.ErrInvalidInput{}
+ err.Argument = "servers.MetadatumOpts"
+ err.Info = "Must have 1 and only 1 key-value pair"
+ return nil, "", err
}
metadatum := map[string]interface{}{"meta": opts}
var key string