Browse Source

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.
main
Sam 4 years ago
parent
commit
6f53d9c8c6
  1. 1
      types.go

1
types.go

@ -28,6 +28,7 @@ type ChatAPI struct { @@ -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
}

Loading…
Cancel
Save