freddycoder/AzureDevOpsTeamMembersVelocity

Exception in the index page

Closed this issue · 1 comments

I got this exception in the main page after wating a while a doing different click into the input text fields

azuredevopsteammembersvelocity_1 | warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
azuredevopsteammembersvelocity_1 | Unhandled exception rendering component: Sequence contains no matching element
azuredevopsteammembersvelocity_1 | System.InvalidOperationException: Sequence contains no matching element
azuredevopsteammembersvelocity_1 | at System.Linq.ThrowHelper.ThrowNoMatchException()
azuredevopsteammembersvelocity_1 | at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
azuredevopsteammembersvelocity_1 | at AzureDevOpsTeamMembersVelocity.Pages.Index.GetTeams() in /src/AzureDevOpsTeamMembersVelocity/Pages/Index.razor:line 262
azuredevopsteammembersvelocity_1 | at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
azuredevopsteammembersvelocity_1 | at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
azuredevopsteammembersvelocity_1 | fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
azuredevopsteammembersvelocity_1 | Unhandled exception in circuit 'wpQOTZPKaI5OsWbb5s4BRznK6AIE4zUmQA32GZeD_yY'.
azuredevopsteammembersvelocity_1 | System.InvalidOperationException: Sequence contains no matching element
azuredevopsteammembersvelocity_1 | at System.Linq.ThrowHelper.ThrowNoMatchException()
azuredevopsteammembersvelocity_1 | at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
azuredevopsteammembersvelocity_1 | at AzureDevOpsTeamMembersVelocity.Pages.Index.GetTeams() in /src/AzureDevOpsTeamMembersVelocity/Pages/Index.razor:line 262
azuredevopsteammembersvelocity_1 | at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
azuredevopsteammembersvelocity_1 | at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

This was due to calling linq.First in an empty list. Will be fixed soon.