You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I ran into a strange problem today, it appeared in a unit test and it was hard to find out exactly what was causing it. I ended up overriding the implementation of the ContentPartFactory class in my program, and then debugging through breakpoints to find the real cause of the problem. #15979
An unhandled exception has occurred while executing the request. System.ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at OrchardCore.ContentManagement.ContentPartFactory.GetTypeActivator(String partName)
at OrchardCore.ContentManagement.GraphQL.Queries.Types.TypedContentTypeBuilder.Build(FieldType contentQuery, ContentTypeDefinition contentTypeDefinition, ContentItemType contentItemType)
at OrchardCore.ContentManagement.GraphQL.Queries.ContentTypeQuery.BuildAsync(ISchema schema)
at OrchardCore.Apis.GraphQL.Services.SchemaService.GetSchemaAsync()
at OrchardCore.Apis.GraphQL.GraphQLMiddleware.ExecuteAsync(HttpContext context, ISchemaFactory schemaService, IDocumentWriter documentWriter)
at OrchardCore.Apis.GraphQL.GraphQLMiddleware.Invoke(HttpContext context, IAuthorizationService authorizationService, IAuthenticationService authenticationService, ISchemaFactory schemaService, IDocumentWriter documentWriter)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at OrchardCore.ContentManagement.ContentPartFactory.GetTypeActivator(String partName)
at OrchardCore.ContentManagement.GraphQL.Queries.Types.TypedContentTypeBuilder.Build(FieldType contentQuery, ContentTypeDefinition contentTypeDefinition, ContentItemType contentItemType)
at OrchardCore.ContentManagement.GraphQL.Queries.ContentTypeQuery.BuildAsync(ISchema schema)
at OrchardCore.Apis.GraphQL.Services.SchemaService.GetSchemaAsync()
at OrchardCore.Apis.GraphQL.GraphQLMiddleware.ExecuteAsync(HttpContext context, ISchemaFactory schemaService, IDocumentWriter documentWriter)
at OrchardCore.Apis.GraphQL.GraphQLMiddleware.Invoke(HttpContext context, IAuthorizationService authorizationService, IAuthenticationService authenticationService, ISchemaFactory schemaService, IDocumentWriter documentWriter)
at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
Describe the solution you'd like
Most of the time we throw exceptions directly in OC without secondary processing, which is not friendly to developers who use OC for secondary development. I hope we can add some descriptions to the logs to help developers quickly locate the problem.
The text was updated successfully, but these errors were encountered:
This is an unexpected exception thrown by a .NET type (most possibly due to a result of a coding error). If an error is something that OC checks and throws an exception for, then that should be easier to understand.
What exactly would you expect OC to do? Note that this exception is not deliberate. BTW you can increase the general log level in e.g. your appsettings file.
Is your feature request related to a problem? Please describe.
I ran into a strange problem today, it appeared in a unit test and it was hard to find out exactly what was causing it. I ended up overriding the implementation of the
ContentPartFactory
class in my program, and then debugging through breakpoints to find the real cause of the problem. #15979Describe the solution you'd like
Most of the time we throw exceptions directly in OC without secondary processing, which is not friendly to developers who use OC for secondary development. I hope we can add some descriptions to the logs to help developers quickly locate the problem.
The text was updated successfully, but these errors were encountered: