Explorar o código

Add yet another status error code

Zed %!s(int64=3) %!d(string=hai) anos
pai
achega
ad9083149c
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 1
      src/parser.nim
  2. 1 0
      src/types.nim

+ 1 - 1
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"})

+ 1 - 0
src/types.nim

@@ -44,6 +44,7 @@ type
     invalidToken = 89
     listIdOrSlug = 112
     tweetNotFound = 144
+    tweetNotAuthorized = 179
     forbidden = 200
     badToken = 239
     noCsrf = 353