ProblemDetailsServiceExtensions Class
HAKOM.ErrorHandling.Http.Net.Api.Extensions
Section titled “HAKOM.ErrorHandling.Http.Net.Api.Extensions”Provides additional methods for writing RFC7807 problem details to HTTP responses.
public static class ProblemDetailsServiceExtensionsInheritance System.Object 🡒 ProblemDetailsServiceExtensions
Methods
Section titled “Methods”ProblemDetailsServiceExtensions.WriteAsync(this IProblemDetailsService, HttpContext, HakomException) Method
Section titled “ProblemDetailsServiceExtensions.WriteAsync(this IProblemDetailsService, HttpContext, HakomException) Method”Writes an RFC7807 problem-details object to an HTTP response based on a HakomException.
public static System.Threading.Tasks.Task WriteAsync(this Microsoft.AspNetCore.Http.IProblemDetailsService problemDetailsService, Microsoft.AspNetCore.Http.HttpContext httpContext, HAKOM.ErrorHandling.Core.Net.Api.HakomException hakomException);Parameters
Section titled “Parameters”problemDetailsService Microsoft.AspNetCore.Http.IProblemDetailsService
The Microsoft.AspNetCore.Http.IProblemDetailsService to use for writing.
httpContext Microsoft.AspNetCore.Http.HttpContext
The current Microsoft.AspNetCore.Http.HttpContext.
hakomException HakomException
The HakomException for which to generate a problem-details response
Returns
Section titled “Returns”System.Threading.Tasks.Task
A System.Threading.Tasks.Task that completes when the response has been written.
Was this page helpful?Thanks for your feedback!