File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/RestExceptions/Extensions Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,11 @@ public static IServiceCollection AddRestExceptions(this IServiceCollection servi
2323 {
2424 options . CustomizeProblemDetails = context =>
2525 {
26- context . ProblemDetails . Instance =
27- $ "[ { context . HttpContext . Request . Method } ] { context . HttpContext . Request . Path } " ;
26+ context . ProblemDetails . Instance = context . HttpContext . Request . Path ;
27+ context . ProblemDetails . Extensions . Add ( "method" , context . HttpContext . Request . Method ) ;
2828 context . ProblemDetails . Extensions . Add ( "requestId" , context . HttpContext . TraceIdentifier ) ;
29-
30- var activity = context . HttpContext . Features . Get < IHttpActivityFeature > ( ) ? . Activity ;
31- context . ProblemDetails . Extensions . TryAdd ( "traceId" , activity ? . Id ) ;
29+ context . ProblemDetails . Extensions . TryAdd ( "traceId" ,
30+ context . HttpContext . Features . Get < IHttpActivityFeature > ( ) ? . Activity . Id ) ;
3231 } ;
3332 } ) ;
3433 services . AddExceptionHandler < RestExceptionHandler > ( ) ;
You can’t perform that action at this time.
0 commit comments