internal/frontend: do not log previousFetchStatusAndResponse 400s as error
Change-Id: I248c048b3775213bdba0d8d9e1c0a607256fdac6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/350570
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/frontend/404.go b/internal/frontend/404.go
index 18950b6..6942424 100644
--- a/internal/frontend/404.go
+++ b/internal/frontend/404.go
@@ -86,7 +86,7 @@
//
// If the latter, log the error.
// In either case, give the user the option to fetch that path.
- if !errors.Is(err, derrors.NotFound) {
+ if !errors.Is(err, derrors.NotFound) && !errors.Is(err, derrors.InvalidArgument) {
log.Error(ctx, err)
}
return pathNotFoundError(ctx, fullPath, requestedVersion)