HAKOM.ErrorHandling.Http.Net.Api Namespace
Contains the public API surface for HTTP error handling in HAKOM web applications.
Remarks
Section titled “Remarks”This namespace exposes the primary abstractions and extension points for integrating RFC 7807 problem-details error handling into ASP.NET Core applications. It includes the IHttpFailureFactory for creating typed HTTP failure results, as well as sub-namespaces for exceptions, extension methods, and serialization support.
Use IHttpFailureFactory to create Failure<TValue> instances that map to standard HTTP error responses such as 404 Not Found.
public Result<ITimeSeries> TryLoad(string name, IHttpFailureFactory failureFactory){ // ... lookup logic ... if (timeSeries == null) return failureFactory.CreateNotFound<ITimeSeries>("TimeSeries", "name", name); return timeSeries;}| Interfaces | |
|---|---|
| IHttpFailureFactory | Creates Failure<TValue> instances that represent HTTP response errors. |
Was this page helpful?Thanks for your feedback!