Niedzielski has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/392572 )
Change subject: Chore: don't log redirects
......................................................................
Chore: don't log redirects
RedirectErrors are exceptional but expected operation and should not be
printed. Add a conditional to guard against logging them.
Change-Id: I6ceb9ecb266afe777b59b1fb82c4c42ec377978c
---
M src/common/routers/router.ts
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/72/392572/1
diff --git a/src/common/routers/router.ts b/src/common/routers/router.ts
index d216737..a43c588 100644
--- a/src/common/routers/router.ts
+++ b/src/common/routers/router.ts
@@ -8,7 +8,11 @@
} from "../../common/routers/route";
import HttpResponse from "../http/http-response";
import { PRODUCTION } from "../assets/config";
-import { ServerError, ClientError } from "../http/fetch-with-redirect";
+import {
+ ServerError,
+ ClientError,
+ RedirectError
+} from "../http/fetch-with-redirect";
import * as notFoundModule from "../pages/not-found";
import { notFound } from "./api";
@@ -62,7 +66,7 @@
// todo: show 5xx page and log for Services / RI and
// return response.status.
console.error(message); // eslint-disable-line no-console
- } else {
+ } else if (!(error instanceof RedirectError)) {
// todo: show 5xx page and log for Marvin.
console.error(message); // eslint-disable-line no-console
}
--
To view, visit https://gerrit.wikimedia.org/r/392572
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ceb9ecb266afe777b59b1fb82c4c42ec377978c
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: Sniedzielski <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits