Skip to content

Commit 02d2196

Browse files
committed
🧑‍💻 add error log on missing PRODUCT_NAME
1 parent ea4ed22 commit 02d2196

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/util/call-comment.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { CallDirection, CallState } from "../models";
21
import moment from "moment";
2+
import { CallDirection, CallState } from "../models";
3+
import { errorLogger } from "./logger.util";
34

45
export function getCommentSubject(
56
state: CallState,
@@ -43,6 +44,12 @@ export function getCommentSubject(
4344

4445
function getProductName() {
4546
const productName = process.env.PRODUCT_NAME;
47+
48+
if (!productName)
49+
errorLogger(
50+
"getProductName",
51+
"Missing environment variable PRODUCT_NAME, using CLINQ."
52+
);
4653
return productName || "CLINQ";
4754
}
4855

0 commit comments

Comments
 (0)