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
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