fix the use of empty fields in the response

This commit is contained in:
2025-10-10 22:22:15 +03:00
parent bed0471cc4
commit ee6fd205d5
2 changed files with 3 additions and 6 deletions

View File

@@ -37,7 +37,9 @@ func NewError(code int, message string, data any, id *json.RawMessage) *RPCRespo
Error = map[string]any{
"code": code,
"message": message,
"data": data,
}
if data != nil {
Error["data"] = data
}
return &RPCResponse{