sirkris / Reddit.NET

A Reddit API library for .NET Standard with OAuth support. Written in C#.
MIT License
500 stars 77 forks source link

RedditTests.ModelTests.WorkflowTests.ModmailTests.GetConversations returns 504 gateway timeout #155

Closed sirkris closed 2 years ago

sirkris commented 2 years ago

Looks like we're getting a timeout from the GetConversations endpoint. Needs investigation.

Details:

Test Name: GetConversations Test FullName: Reddit.NETTests.RedditTests.ModelTests.WorkflowTests.ModmailTests.GetConversations Test Source: E:\repos\Reddit.NET\src\Reddit.NETTests\ModelTests\WorkflowTests\ModmailTests.cs : line 14 Test Outcome: Failed Test Duration: 0:00:00

Test Name: GetConversations Test Outcome: Failed Result StackTrace:
at Reddit.Models.Internal.Request.ProcessResponse(IRestResponse res) in E:\repos\Reddit.NET\src\Reddit.NET\Models\Internal\Request.cs:line 283 at Reddit.Models.Internal.Request.ExecuteRequest(RestRequest restRequest) in E:\repos\Reddit.NET\src\Reddit.NET\Models\Internal\Request.cs:line 298 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Reddit.Models.Internal.Request.SendRequest[T](String url, Object parameters, Method method, String contentType) in E:\repos\Reddit.NET\src\Reddit.NET\Models\Internal\Request.cs:line 53 at Reddit.Models.Modmail.GetConversations(ModmailGetConversationsInput modmailGetConversationsInput) in E:\repos\Reddit.NET\src\Reddit.NET\Models\Modmail.cs:line 34 at RedditTests.ModelTests.WorkflowTests.ModmailTests.GetConversations() in E:\repos\Reddit.NET\src\Reddit.NETTests\ModelTests\WorkflowTests\ModmailTests.cs:line 16 Result Message: Test method RedditTests.ModelTests.WorkflowTests.ModmailTests.GetConversations threw exception: Reddit.Exceptions.RedditGatewayTimeoutException: Reddit API returned Gateway Timeout (504) response.

sirkris commented 2 years ago

Looks like the endpoint is either broken or changed somehow. Posted a ticket at:

https://www.reddit.com/r/redditdev/comments/vj7nki/get_apimodconversations_returns_504_gateway/

sirkris commented 2 years ago

Still no response on redditdev thread. Sent a follow-up message to the Reddit admins seeking clarification.

sirkris commented 2 years ago

No response from Reddit admins yet. Still no idea what the status of this endpoint is.

I'll keep trying to get an answer. In the meantime, this ticket is blocked.

sirkris commented 2 years ago

Still no response from Reddit devs.

According to the Reddit API docs, this endpoint is still supported. So I honestly have no idea what the hell is going on with this right now.

If I don't get a response from Reddit in time for the release, I'll just add an obsolete flag to the GetConversations method with a message explaining that this endpoint is currently broken and there's no official word from Reddit regarding the issue. I won't delay the release over this.

sirkris commented 2 years ago

So apparently, the regression is that the API now times out for this endpoint if you specify an empty "entity" parameter. This never caused any problems before. Specifying the test subreddit for "entity" solves the problem. I'll update the test case and add a warning to the inline docs for that endpoint.

sirkris commented 2 years ago

Merged into 1.6.