diff --git a/structure.go b/structure.go index 77d6739..31615f1 100644 --- a/structure.go +++ b/structure.go @@ -39,7 +39,7 @@ type Config struct { SQLPass string `xml:"SQLPass"` SQLDB string `xml:"SQLDB"` - Debug bool `xml:"Debug"` + Debug bool `xml:"Debug"` NoAuth bool `xml:"NoAuth"` } diff --git a/utils.go b/utils.go index f9b348f..0829a77 100644 --- a/utils.go +++ b/utils.go @@ -206,8 +206,7 @@ func (e *Envelope) Error(errorCode int, reason string, err error) { // Ensure all additional fields are empty to avoid conflict. e.Body.Response.CustomFields = nil - e.AddKVNode("UserReason", reason) - e.AddKVNode("ServerReason", err.Error()) + e.AddKVNode("ErrorMessage", fmt.Sprintf("%s: %v", reason, err)) } // normalise parses a document, returning a document with only the request type's child nodes, stripped of prefix.