octokit.net icon indicating copy to clipboard operation
octokit.net copied to clipboard

Exception while getting Issue Events for repository

Open lalberto8085 opened this issue 9 years ago • 1 comments
trafficstars

I'm using octokit 0.22.0 to get all issue-events for a given repo in my organization for reporting, but whenever I call:

var issueActivity = await client.Activity.Events.GetAllIssuesForRepository(owner, repo);

I get this error

{ "Message": "An error has occurred.",
"ExceptionMessage": "The given key was not present in the dictionary.",
"ExceptionType": "System.Collections.Generic.KeyNotFoundException",
"StackTrace": " at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 154 at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\SimpleJson.cs:line 1505 at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 166 at Octokit.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\SimpleJson.cs:line 583 at Octokit.SimpleJson.DeserializeObject[T](String json, IJsonSerializerStrategy jsonSerializerStrategy) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\SimpleJson.cs:line 595 at Octokit.Internal.SimpleJsonSerializer.Deserialize[T](String json) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\Http\\SimpleJsonSerializer.cs:line 21 at Octokit.Internal.JsonHttpPipeline.DeserializeResponse[T](IResponse response) in C:\\Users\\shiftkey\\Documents\\GitHub\\octokit.net\\Octokit\\Http\\JsonHttpPipeline.cs:line 62 at Octokit.Connection.<Run>d__521.MoveNext() in C:\Users\shiftkey\Documents\GitHub\octokit.net\Octokit\Http\Connection.cs:line 544

--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Octokit.ApiConnection.<GetPage>d__40`1.MoveNext() in C:\Users\shiftkey\Documents\GitHub\octokit.net\Octokit\Http\ApiConnection.cs:line 0

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Octokit.ApiConnection.<>c__DisplayClass17_0`1.<<GetAll>b__0>d.MoveNext() in C:\Users\shiftkey\Documents\GitHub\octokit.net\Octokit\Http\ApiConnection.cs:line 0

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Octokit.ApiPagination.<GetAllPages>d__0`1.MoveNext() in C:\Users\shiftkey\Documents\GitHub\octokit.net\Octokit\Clients\ApiPagination.cs:line 0

--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at Wenbot.Infrastructure.Github.GitHubDigestClientExtension.<GetRepositoryActivity>d__1.MoveNext() in C:\Development\wenbot\src\Wenbot.Infrastructure\Github\GitHubDigestClientExtension.cs:line 39

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Wenbot.Api.Controllers.GitHubController.<Activity>d__4.MoveNext() in C:\Development\wenbot\src\Wenbot.Api\Controllers\GitHubController.cs:line 97

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()" }

I know owner and repo are right since I've used them for other calls as well.

Also I think that some of the original development environment slipped in :wink:.

lalberto8085 avatar Sep 08 '16 20:09 lalberto8085

Yeah, I'm pretty sure this stuff is broken and needs some love https://github.com/octokit/octokit.net/issues/1251 😢

shiftkey avatar Sep 09 '16 00:09 shiftkey

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Jul 24 '23 01:07 github-actions[bot]