From 31b609dff0996c936706b0bccfdf0177268f2b6a Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 5 Mar 2022 13:33:24 +1100 Subject: [PATCH] Print friendlier file path when file does not exist --- v2/internal/frontend/desktop/windows/frontend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go index 8532b8d6f..2eb152002 100644 --- a/v2/internal/frontend/desktop/windows/frontend.go +++ b/v2/internal/frontend/desktop/windows/frontend.go @@ -362,7 +362,8 @@ func (f *Frontend) processRequest(req *edge.ICoreWebView2WebResourceRequest, arg // for all other platforms to improve security. return // Let WebView2 handle the request with its default handler } else if err != nil { - f.logger.Error("Error processing request '%s': %s (HttpResponse=%s)", uri, err, res) + path := strings.Replace(uri, "https://wails.localhost", "", 1) + f.logger.Error("Error processing request '%s': %s (HttpResponse=%s)", path, err, res) } headers := []string{}