Skip to content

Commit

Permalink
Merge pull request #2354 from greymistcube/feature/gql-verbose-exception
Browse files Browse the repository at this point in the history
Add detail to graphQL exceptions
  • Loading branch information
greymistcube authored Dec 12, 2023
2 parents ad4f08e + bf791ae commit b2104a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NineChronicles.Headless/GraphQLService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ public void ConfigureServices(IServiceCollection services)
{
Log.Error(context.Exception.ToString());
Log.Error(context.ErrorMessage);

context.Exception.Data["exception"] = context.Exception.GetType().ToString();
context.Exception.Data["message"] = context.Exception.Message;
context.Exception.Data["innerException"] = context.Exception.InnerException?.GetType().ToString();
context.Exception.Data["stackTrace"] = context.Exception.StackTrace;
};
})
.AddSystemTextJson()
Expand Down

0 comments on commit b2104a0

Please sign in to comment.