Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayerController throws EntityDoesNotExistException for non-existent player #781

Closed
HolisticDeveloper opened this issue Jun 3, 2023 · 0 comments
Milestone

Comments

@HolisticDeveloper
Copy link
Contributor

HolisticDeveloper commented Jun 3, 2023

When a player details URL points to a non-existent player, the page throws an EntityDoesNotExistException rather than returning a 404.

Example: https://nemestats.com/Player/Details/84941

View details in Rollbar: https://rollbar.com/jakejgordon/NemeStats/items/3495/

Traceback (most recent call last):
  File "C:\repos\NemeStats\Source\BusinessLogic\Logic\Players\PlayerRetriever.cs", line 230, in ValidatePlayerWasFound(System.Int32 playerId, BusinessLogic.Models.Player returnPlayer)
  File "C:\repos\NemeStats\Source\BusinessLogic\Logic\Players\PlayerRetriever.cs", line 175, in GetPlayerDetails(System.Int32 playerId, System.Int32 numberOfRecentGamesToRetrieve)
  File "C:\repos\NemeStats\Source\UI\Controllers\PlayerController.cs", line 96, in Details(System.Int32 id, BusinessLogic.Models.User.ApplicationUser currentUser)
  File "(unknown)", line 147, in lambda_method(System.Runtime.CompilerServices.Closure , System.Web.Mvc.ControllerBase , System.Object[] )
  File "System.Web.Mvc.ActionMethodDispatcher", line unknown, in Execute(System.Web.Mvc.ControllerBase controller, System.Object[] parameters)
  File "System.Web.Mvc.ReflectedActionDescriptor", line 81, in Execute(System.Web.Mvc.ControllerContext controllerContext, System.Collections.Generic.IDictionary`2[System.String,System.Object] parameters)
  File "System.Web.Mvc.ControllerActionInvoker", line unknown, in InvokeActionMethod(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor, System.Collections.Generic.IDictionary`2[System.String,System.Object] parameters)
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker", line unknown, in <BeginInvokeSynchronousActionMethod>b__39(System.IAsyncResult asyncResult, System.Web.Mvc.Async.AsyncControllerActionInvoker+ActionInvocation innerInvokeState)
  File "System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`2", line unknown, in CallEndDelegate(System.IAsyncResult asyncResult)
  File "System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1", line 41, in End
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker", line unknown, in EndInvokeActionMethod(System.IAsyncResult asyncResult)
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters", line 20, in <InvokeActionMethodFilterAsynchronouslyRecursive>b__3d
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46", line 134, in <InvokeActionMethodFilterAsynchronouslyRecursive>b__3f
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46", line 134, in <InvokeActionMethodFilterAsynchronouslyRecursive>b__3f
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass33", line unknown, in <BeginInvokeActionMethodWithFilters>b__32(System.IAsyncResult asyncResult)
  File "System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1", line unknown, in CallEndDelegate(System.IAsyncResult asyncResult)
  File "System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1", line 41, in End
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker", line unknown, in EndInvokeActionMethodWithFilters(System.IAsyncResult asyncResult)
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b", line unknown, in <BeginInvokeAction>b__1c
  File "System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21", line unknown, in <BeginInvokeAction>b__1e(System.IAsyncResult asyncResult)
EntityDoesNotExistException`1: Entity of type 'BusinessLogic.Models.Player' with Id '35131' does not exist.
@HolisticDeveloper HolisticDeveloper added this to the maintenance-next milestone Jun 3, 2023
@HolisticDeveloper HolisticDeveloper changed the title EntityDoesNotExistException`1: Entity of type 'BusinessLogic.Models.Player' with Id '84941' does not exist. PlayerController throws EntityDoesNotExistException for non-existent player Jun 3, 2023
HolisticDeveloper added a commit that referenced this issue Jun 3, 2023
…tExist

fix EntityDoesNotExistException for non-existent player #781
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant