mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-05 13:01:01 +02:00
Properly handle ErrorMessage
Some ECDK versions print ErrorMessage to the common EC log.
This commit is contained in:
parent
5bcb474a78
commit
bd48515bf9
@ -39,7 +39,7 @@ type Config struct {
|
|||||||
SQLPass string `xml:"SQLPass"`
|
SQLPass string `xml:"SQLPass"`
|
||||||
SQLDB string `xml:"SQLDB"`
|
SQLDB string `xml:"SQLDB"`
|
||||||
|
|
||||||
Debug bool `xml:"Debug"`
|
Debug bool `xml:"Debug"`
|
||||||
NoAuth bool `xml:"NoAuth"`
|
NoAuth bool `xml:"NoAuth"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
utils.go
3
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.
|
// Ensure all additional fields are empty to avoid conflict.
|
||||||
e.Body.Response.CustomFields = nil
|
e.Body.Response.CustomFields = nil
|
||||||
|
|
||||||
e.AddKVNode("UserReason", reason)
|
e.AddKVNode("ErrorMessage", fmt.Sprintf("%s: %v", reason, err))
|
||||||
e.AddKVNode("ServerReason", err.Error())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// normalise parses a document, returning a document with only the request type's child nodes, stripped of prefix.
|
// normalise parses a document, returning a document with only the request type's child nodes, stripped of prefix.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user