Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 9106e9f

Browse files
authored
Merge pull request #167 from sanjam-deriv/hotfix
fix: console error
2 parents 60d43fb + 087626d commit 9106e9f

File tree

2 files changed

+4
-8
lines changed
  • src

2 files changed

+4
-8
lines changed

src/features/Apiexplorer/RequestResponseRenderer/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ function RequestResponseRenderer<T extends TSocketEndpointNames>({
3434
try {
3535
request_data = JSON.parse(reqData);
3636
} catch (error) {
37-
console.error('Could not parse the JSON data while trying to send the request: ', error);
38-
console.log(error);
3937
setIsNotValid(true);
4038
setToggleModal(false);
4139
}

src/hooks/useDynamicImportJSON/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,15 @@ const useDynamicImportJSON = () => {
5454
.then((data) => {
5555
setRequestInfo(data);
5656
})
57-
.catch((error) => {
58-
// eslint-disable-next-line
59-
console.error(error);
57+
.catch(() => {
58+
setRequestInfo({});
6059
});
6160
import(`../../../config/v3/${selected_value}/receive.json`)
6261
.then((data) => {
6362
setResponseInfo(data);
6463
})
65-
.catch((error) => {
66-
// eslint-disable-next-line
67-
console.error(error);
64+
.catch(() => {
65+
setResponseInfo({});
6866
});
6967
},
7068
[setRequestInfo, setResponseInfo],

0 commit comments

Comments
 (0)