From d45f84afbd6b2951ef5183df7d1057122acd7367 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 28 Jun 2022 16:24:49 -0700 Subject: [PATCH] Change firebase handler rejection logging. --- .../production-list-columns.data.js | 3 +-- server/firebase/firebase-handler.js | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index 203dd9c46..c3f8ecf88 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -1,8 +1,7 @@ import { PauseCircleOutlined } from "@ant-design/icons"; -import { Space, Tag } from "antd"; +import { Space } from "antd"; import i18n from "i18next"; import moment from "moment"; -import React from "react"; import { Link } from "react-router-dom"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; import { TimeFormatter } from "../../utils/DateFormatter"; diff --git a/server/firebase/firebase-handler.js b/server/firebase/firebase-handler.js index 8fae9d96a..7221649ec 100644 --- a/server/firebase/firebase-handler.js +++ b/server/firebase/firebase-handler.js @@ -257,12 +257,14 @@ exports.validateFirebaseIdToken = async (req, res, next) => { return; } catch (error) { logger.log("api-unauthorized-call", "WARN", null, null, { - req, + path: req.path, + body: req.body, + type: "unauthroized", - error, + ...error, }); - res.status(403).send("Unauthorized"); + res.status(401).send("Unauthorized"); return; } };