diff --git a/src/features/Apiexplorer/RequestResponseRenderer/index.tsx b/src/features/Apiexplorer/RequestResponseRenderer/index.tsx index 6b1b7848..c909ba6d 100644 --- a/src/features/Apiexplorer/RequestResponseRenderer/index.tsx +++ b/src/features/Apiexplorer/RequestResponseRenderer/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback, useEffect } from 'react'; +import React, { useState, useCallback } from 'react'; import { TSocketEndpointNames, TSocketRequestProps } from '@site/src/configs/websocket/types'; import { Button } from '@deriv/ui'; import useWS from '@site/src/hooks/useWs'; @@ -33,8 +33,6 @@ function RequestResponseRenderer({ try { request_data = JSON.parse(reqData); } catch (error) { - console.error('Could not parse the JSON data while trying to send the request: ', error); - console.log(error); setIsNotValid(true); setToggleModal(false); } diff --git a/src/hooks/useDynamicImportJSON/index.tsx b/src/hooks/useDynamicImportJSON/index.tsx index 11e169c0..08714e37 100644 --- a/src/hooks/useDynamicImportJSON/index.tsx +++ b/src/hooks/useDynamicImportJSON/index.tsx @@ -54,17 +54,15 @@ const useDynamicImportJSON = () => { .then((data) => { setRequestInfo(data); }) - .catch((error) => { - // eslint-disable-next-line - console.error(error); + .catch(() => { + setRequestInfo({}); }); import(`../../../config/v3/${selected_value}/receive.json`) .then((data) => { setResponseInfo(data); }) - .catch((error) => { - // eslint-disable-next-line - console.error(error); + .catch(() => { + setResponseInfo({}); }); }, [setRequestInfo, setResponseInfo],