Skip to content

Commit ad5290e

Browse files
committed
Fix
1 parent 844a6e7 commit ad5290e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Apitally/RequestLogger.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,10 @@ public void LogRequest(
149149

150150
try
151151
{
152-
var path = !string.IsNullOrEmpty(request.Path)
153-
? request.Path
154-
: new Uri(request.Url).AbsolutePath;
152+
var path =
153+
!string.IsNullOrEmpty(request.Path) ? request.Path
154+
: !string.IsNullOrEmpty(request.Url) ? new Uri(request.Url).AbsolutePath
155+
: string.Empty;
155156
var userAgent = GetHeaderValue(request.Headers, "user-agent");
156157
if (
157158
ShouldExcludePath(path)

0 commit comments

Comments
 (0)