Merge pull request #1910 from bluewave-labs/hotfix/throw-error

hotfix:replace throwing error with console.warn
This commit is contained in:
Alexander Holliday authored and GitHub committed 2025-03-11 10:16:25 -07:00
commit 6578d7e78a
1 file changed
+9 -2
@@ -2,7 +2,13 @@ import { useState } from "react";
import { useEffect } from "react";
import { networkService } from "../../../../main";
import { createToast } from "../../../../Utils/toastUtils";
export const useChecksFetch = ({ monitorId, monitorType, dateRange, page, rowsPerPage }) => {
export const useChecksFetch = ({
monitorId,
monitorType,
dateRange,
page,
rowsPerPage,
}) => {
const [checks, setChecks] = useState(undefined);
const [checksCount, setChecksCount] = useState(undefined);
const [isLoading, setIsLoading] = useState(false);
@@ -10,7 +16,8 @@ export const useChecksFetch = ({ monitorId, monitorType, dateRange, page, rowsPe
useEffect(() => {
if (!monitorType) {
throw new Error('Monitor Type is not provided. Fetching checks will not proceed.');
console.warn("Monitor Type is not provided. Fetching checks will not proceed.");
return;
}
const fetchChecks = async () => {