/// <inheritdoc/> public override ProblemDetails CreateProblemDetails( IOwinContext httpContext, int?statusCode = null, string?title = null, string?type = null, string?detail = null, string?instance = null ) { statusCode ??= 500; var problemDetails = new ProblemDetails { Status = statusCode, Title = title, Type = type, Detail = detail, Instance = instance, }; ApplyProblemDetailsDefaults(httpContext, problemDetails, statusCode.Value); return(problemDetails); }
private static void AddCustomProperties(IntelligentPlant.ProblemDetails.ProblemDetails problemDetails) { problemDetails.Extensions["request-id"] = "some-id"; problemDetails.Extensions["utc-time"] = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); }