Skip to content

Commit

Permalink
feat: add errorInfo field to message struct
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Nov 10, 2022
1 parent 7fd659d commit b80c8fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions venus-shared/api/messager/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -278,6 +279,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -342,6 +344,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -408,6 +411,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -588,6 +592,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -649,6 +654,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -710,6 +716,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -776,6 +783,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -846,6 +854,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down Expand Up @@ -1353,6 +1362,7 @@ Response:
},
"WalletName": "test",
"State": 1,
"ErrorMsg": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
}
Expand Down
8 changes: 6 additions & 2 deletions venus-shared/types/messager/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ type Message struct {

State MessageState

// Error is set if the message failed to fill
ErrorMsg string

CreatedAt time.Time
UpdatedAt time.Time
}
Expand Down Expand Up @@ -115,8 +118,8 @@ func (m *Message) MarshalJSON() ([]byte, error) {
Meta *SendSpec
WalletName string

State MessageState

State MessageState
ErrorMsg string
CreatedAt time.Time
UpdatedAt time.Time
}
Expand Down Expand Up @@ -144,6 +147,7 @@ func (m *Message) MarshalJSON() ([]byte, error) {
Meta: m.Meta,
WalletName: m.WalletName,
State: m.State,
ErrorMsg: m.ErrorMsg,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,
})
Expand Down

0 comments on commit b80c8fc

Please sign in to comment.