-
-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Description
blows up with:
fail: JsonApiDotNetCore.Middleware.JsonApiExceptionFilter[0]
An unhandled exception occurred during the request
System.NullReferenceException: Object reference not set to an instance of an object.
at JsonApiDotNetCore.Services.JsonApiContext.ApplyContext[T](Object controller)
at JsonApiDotNetCore.Controllers.BaseJsonApiController`2..ctor(IJsonApiContext jsonApiContext, IGetAllService`2 getAll, IGetByIdService`2 getById, IGetRelationshipService`2 getRelationship, IGetRelationshipsService`2 getRelationships, ICreateService`2 create, IUpdateService`2 update, IUpdateRelationshipService`2 updateRelationships, IDeleteService`2 delete)
at N2JsonApi.Web.Domain.PendingItemChanges.PendingItemChangesController..ctor(IJsonApiContext jsonApiContext, IGetAllService`2 getAll) in /Users/michellesantarsiero/dev/n2-jsonapi/src/N2JsonApi.Web/Domain/PendingItemChanges/PendingItemChangesController.cs:line 20
at lambda_method(Closure , IServiceProvider , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.TypeActivatorCache.CreateInstance[TInstance](IServiceProvider serviceProvider, Type implementationType)
at Microsoft.AspNetCore.Mvc.Controllers.DefaultControllerFactory.CreateController(ControllerContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()
JsonApiDotNetCore/src/JsonApiDotNetCore/Services/JsonApiContext.cs
Lines 62 to 71 in 9a84c07
| RequestEntity = ContextGraph.GetContextEntity(typeof(T)); | |
| if (context.Request.Query.Any()) | |
| { | |
| QuerySet = new QuerySet(this, context.Request.Query); | |
| IncludedRelationships = QuerySet.IncludedRelationships; | |
| } | |
| var linkBuilder = new LinkBuilder(this); | |
| BasePath = linkBuilder.GetBasePath(context, RequestEntity.EntityName); |