From 6f53d9c8c6d0c3036ab1b9ec74b77f43d540f1b5 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Dec 2019 08:29:02 -0500 Subject: [PATCH] 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. --- types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/types.go b/types.go index 65c9f36..56f1914 100644 --- a/types.go +++ b/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 }