OSDN Git Service

タイムラインの取得結果にレートリミットに関するメッセージが含まれていた場合はエラーとして扱う
[opentween/open-tween.git] / OpenTween / Api / GraphQL / HomeLatestTimelineRequest.cs
index d11c0ca..63bea06 100644 (file)
@@ -72,6 +72,9 @@ namespace OpenTween.Api.GraphQL
             ErrorResponse.ThrowIfError(rootElm);
 
             var tweets = TimelineTweet.ExtractTimelineTweets(rootElm);
+            if (tweets.Length == 0)
+                ErrorResponse.ThrowIfContainsRateLimitMessage(rootElm);
+
             var cursorTop = rootElm.XPathSelectElement("//content[__typename[text()='TimelineTimelineCursor']][cursorType[text()='Top']]/value")?.Value;
             var cursorBottom = rootElm.XPathSelectElement("//content[__typename[text()='TimelineTimelineCursor']][cursorType[text()='Bottom']]/value")?.Value;