fix: omit null payloadJSON in node invoke results
This commit is contained in:
@@ -180,8 +180,10 @@ public actor GatewayNodeSession {
|
|||||||
"id": AnyCodable(request.id),
|
"id": AnyCodable(request.id),
|
||||||
"nodeId": AnyCodable(request.nodeId),
|
"nodeId": AnyCodable(request.nodeId),
|
||||||
"ok": AnyCodable(response.ok),
|
"ok": AnyCodable(response.ok),
|
||||||
"payloadJSON": AnyCodable(response.payloadJSON ?? NSNull()),
|
|
||||||
]
|
]
|
||||||
|
if let payloadJSON = response.payloadJSON {
|
||||||
|
params["payloadJSON"] = AnyCodable(payloadJSON)
|
||||||
|
}
|
||||||
if let error = response.error {
|
if let error = response.error {
|
||||||
params["error"] = AnyCodable([
|
params["error"] = AnyCodable([
|
||||||
"code": AnyCodable(error.code.rawValue),
|
"code": AnyCodable(error.code.rawValue),
|
||||||
|
|||||||
Reference in New Issue
Block a user