Skip to content

Commit 6578d7e

Browse files
authored
Merge pull request bluewave-labs#1910 from bluewave-labs/hotfix/throw-error
hotfix:replace throwing error with console.warn
2 parents 079a269 + ee4c159 commit 6578d7e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Pages/Uptime/Details/Hooks/useChecksFetch.jsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@ import { useState } from "react";
22
import { useEffect } from "react";
33
import { networkService } from "../../../../main";
44
import { createToast } from "../../../../Utils/toastUtils";
5-
export const useChecksFetch = ({ monitorId, monitorType, dateRange, page, rowsPerPage }) => {
5+
export const useChecksFetch = ({
6+
monitorId,
7+
monitorType,
8+
dateRange,
9+
page,
10+
rowsPerPage,
11+
}) => {
612
const [checks, setChecks] = useState(undefined);
713
const [checksCount, setChecksCount] = useState(undefined);
814
const [isLoading, setIsLoading] = useState(false);
915
const [networkError, setNetworkError] = useState(false);
1016

1117
useEffect(() => {
1218
if (!monitorType) {
13-
throw new Error('Monitor Type is not provided. Fetching checks will not proceed.');
19+
console.warn("Monitor Type is not provided. Fetching checks will not proceed.");
20+
return;
1421
}
1522

1623
const fetchChecks = async () => {

0 commit comments

Comments
 (0)