mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-03 20:11:14 +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"`
|
||||
SQLDB string `xml:"SQLDB"`
|
||||
|
||||
Debug bool `xml:"Debug"`
|
||||
Debug bool `xml:"Debug"`
|
||||
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.
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user