question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Summary<TEndpoint, TRequest> throws a runtime error

See original GitHub issue

.Net core 6 API and I tried using the MySummary : Summary<TEndpoint, TRequest> class for creating summaries.

It compiles, but the runtime throws this error

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at FastEndpoints.EndpointData.BuildEndpointDefinitions(IServiceCollection services, IEnumerable`1 assemblies, ConfigurationManager config)
   at FastEndpoints.EndpointData.<>c__DisplayClass6_0.<.ctor>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at FastEndpoints.EndpointData..ctor(IServiceCollection services, IEnumerable`1 assemblies, ConfigurationManager config)
   at FastEndpoints.MainExtensions.AddFastEndpoints(IServiceCollection services, IEnumerable`1 endpointAssmeblies, ConfigurationManager config)
  at Program.<Main>$(String[] args) in - "builder.Services.AddFastEndpoints();"

If I remove the second generic, TRequest, it works just fine, but I no longer have any reference to my request.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
OFarkcommented, Jun 20, 2022

I see you pushed 4.3.0 over the weekend. This fixed the problem for me and it has allowed me to use this method to base class the summaries to solve my other problem with the XML summary base class issue. #153

0reactions
OFarkcommented, Aug 4, 2022

I cannot get the Application Pool settings, regarding recycling, idling, termination style, or login as a user, to reproduce the issue, it does just seem to happen “randomly”. I’ll also check the event logs next time, but I have implemented 4.5.0-beta to test wjax’s logging. So I’ll send that to the #173 when I get a log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling DomainExceptions using REST endpoint
The rest end point will receive an request with data then,; Business service class is called with the data; Validate the data if...
Read more >
How do you know what's gone wrong when your API ...
When an API request doesn't work, hopefully the client receives a sensible HTTP error status, like 409 or 500, which is a good...
Read more >
Handling Exceptions Returned from the Web API
A 404 error is generated by a Web server when a user requests a page, or other resource, that is not valid on...
Read more >
Server Error in / application - Endpoint Security
After updating Ivanti Endpoint Security to version 8.6 RTM the web console will not load. This error is returned. User-added image
Read more >
Exception Handling in ASP.NET Web API
Describes ASP.NET Web API executes error and exception handling and provides examples for errors and exceptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found