From ad9083149c75f7bf0cf20e3433a272ef3ff55c24 Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 6 Mar 2023 11:00:27 +0100 Subject: [PATCH] Add yet another status error code --- src/parser.nim | 2 +- src/types.nim | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parser.nim b/src/parser.nim index daf7aea..3f39c3f 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -301,7 +301,7 @@ proc parseGlobalObjects(js: JsonNode): GlobalObjects = proc parseStatus*(js: JsonNode): Tweet = with e, js{"errors"}: - if e.getError in {tweetNotFound, tweetUnavailable, tweetCensored, doesntExist}: + if e.getError in {tweetNotFound, tweetUnavailable, tweetCensored, doesntExist, tweetNotAuthorized}: return result = parseTweet(js, js{"card"}) diff --git a/src/types.nim b/src/types.nim index 573fe8c..6f742d1 100644 --- a/src/types.nim +++ b/src/types.nim @@ -44,6 +44,7 @@ type invalidToken = 89 listIdOrSlug = 112 tweetNotFound = 144 + tweetNotAuthorized = 179 forbidden = 200 badToken = 239 noCsrf = 353