File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ public IActionResult Error(int statusCode)
2121 return View (
2222 new ErrorViewModel
2323 {
24- RequestId = Activity . Current ? . Id ?? HttpContext . TraceIdentifier ,
25- Path = feature ? . RawTarget ,
24+ RequestId = Activity . Current ? . Id ?? "" ,
25+ AspNetTrace = HttpContext . TraceIdentifier ,
26+ Path = feature ? . RawTarget ?? "NO PATH" ,
2627 }
2728 ) ;
2829 }
Original file line number Diff line number Diff line change @@ -7,5 +7,7 @@ public class ErrorViewModel
77 public bool ShowRequestId => ! string . IsNullOrEmpty ( RequestId ) ;
88
99 public string Path { get ; internal set ; }
10+
11+ public string AspNetTrace { get ; set ; }
1012 }
1113}
Original file line number Diff line number Diff line change 1515 <p > RequestId : @Model.RequestId </p >
1616}
1717
18+ @if (Model .AspNetTrace is not null )
19+ {
20+ <p >TraceIdentifier : @Model.AspNetTrace </p >
21+ }
22+
1823@if (! string .IsNullOrWhiteSpace (Model .Path ))
1924{
2025 <p > Путь: @Model.Path </p >
You can’t perform that action at this time.
0 commit comments