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:
1
types.go
1
types.go
@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user