Catch errors from api-listen

When the `keybase chat api-listen` command returns a message with
an error, the format of the error json is unlike most (or all?)
other errors they return. This commit adds the `ErrorListen` field
to ChatAPI to catch those errors.
This commit is contained in:
Sam
2019-12-20 08:29:02 -05:00
parent c4525fe850
commit 6f53d9c8c6

View File

@ -28,6 +28,7 @@ type ChatAPI struct {
Result *result `json:"result,omitempty"`
Pagination *pagination `json:"pagination,omitempty"`
Error *Error `json:"error,omitempty"`
ErrorListen *string `json:"error,omitempty"` // Keybase's api-listen command has error messages in this format instead of their normal error output
keybase Keybase // Some methods will need this, so I'm passing it but keeping it unexported
}