diff --git a/admin/src/apis/authAPI.ts b/admin/src/apis/authAPI.ts index 3c39f1c7..1a1f8b6e 100644 --- a/admin/src/apis/authAPI.ts +++ b/admin/src/apis/authAPI.ts @@ -18,7 +18,6 @@ export const AuthAPI = { return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/admin/src/apis/imageAPI.ts b/admin/src/apis/imageAPI.ts index c9169d7f..bbbcb3f0 100644 --- a/admin/src/apis/imageAPI.ts +++ b/admin/src/apis/imageAPI.ts @@ -17,7 +17,6 @@ export const ImageAPI = { return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/admin/src/apis/lotteryAPI.ts b/admin/src/apis/lotteryAPI.ts index bc1e335b..5eff924f 100644 --- a/admin/src/apis/lotteryAPI.ts +++ b/admin/src/apis/lotteryAPI.ts @@ -27,7 +27,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -40,7 +39,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -52,7 +50,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -64,7 +61,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -82,7 +78,6 @@ export const LotteryAPI = { ); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -100,7 +95,6 @@ export const LotteryAPI = { ); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -118,7 +112,6 @@ export const LotteryAPI = { ); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -133,7 +126,6 @@ export const LotteryAPI = { }); return {}; } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/admin/src/apis/rushAPI.ts b/admin/src/apis/rushAPI.ts index a21b0a7e..eaa3a9e1 100644 --- a/admin/src/apis/rushAPI.ts +++ b/admin/src/apis/rushAPI.ts @@ -24,7 +24,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -40,7 +39,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -58,7 +56,6 @@ export const RushAPI = { ); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -76,7 +73,6 @@ export const RushAPI = { ); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -91,7 +87,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/admin/src/hooks/useFetchMultiple.ts b/admin/src/hooks/useFetchMultiple.ts index 5a76ae8d..f5dd03c6 100644 --- a/admin/src/hooks/useFetchMultiple.ts +++ b/admin/src/hooks/useFetchMultiple.ts @@ -34,7 +34,6 @@ export default function useFetchMultiple( setIsSuccess(true); } catch (error) { setIsError(true); - console.error(error); if (showError) { showBoundary(error); } diff --git a/admin/src/utils/getMsTime.ts b/admin/src/utils/getMsTime.ts index b5e4eefa..8d6ffb39 100644 --- a/admin/src/utils/getMsTime.ts +++ b/admin/src/utils/getMsTime.ts @@ -2,7 +2,6 @@ export function getMsTime(dateString: string) { const date = new Date(dateString); if (isNaN(date.getTime())) { - console.error(`Invalid date string: ${dateString}`); return -1; } diff --git a/client/src/apis/authAPI.ts b/client/src/apis/authAPI.ts index 1a114137..7e74a0d3 100644 --- a/client/src/apis/authAPI.ts +++ b/client/src/apis/authAPI.ts @@ -16,7 +16,6 @@ export const AuthAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/client/src/apis/linkAPI.ts b/client/src/apis/linkAPI.ts index 822ec7b4..a7c58805 100644 --- a/client/src/apis/linkAPI.ts +++ b/client/src/apis/linkAPI.ts @@ -15,7 +15,6 @@ export const LinkAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/client/src/apis/lotteryAPI.ts b/client/src/apis/lotteryAPI.ts index d82adf00..3f6044fb 100644 --- a/client/src/apis/lotteryAPI.ts +++ b/client/src/apis/lotteryAPI.ts @@ -21,7 +21,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -33,7 +32,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -45,7 +43,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -58,7 +55,6 @@ export const LotteryAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/client/src/apis/rushAPI.ts b/client/src/apis/rushAPI.ts index 1989ddc7..6207cc38 100644 --- a/client/src/apis/rushAPI.ts +++ b/client/src/apis/rushAPI.ts @@ -23,7 +23,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -37,7 +36,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -49,7 +47,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -69,7 +66,6 @@ export const RushAPI = { throw new Error(`Unexpected response status: ${response.status}`); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -84,7 +80,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -96,7 +91,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -108,7 +102,6 @@ export const RushAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, @@ -124,7 +117,6 @@ export const RushAPI = { throw new Error(`Unexpected response status: ${response.status}`); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/client/src/apis/totalAPI.ts b/client/src/apis/totalAPI.ts index 78a8ba81..f17fbcc2 100644 --- a/client/src/apis/totalAPI.ts +++ b/client/src/apis/totalAPI.ts @@ -15,7 +15,6 @@ export const TotalAPI = { }); return response.json(); } catch (error) { - console.error("Error:", error); throw error; } }, diff --git a/client/src/hooks/useFetch.ts b/client/src/hooks/useFetch.ts index 76849e7f..472a6984 100644 --- a/client/src/hooks/useFetch.ts +++ b/client/src/hooks/useFetch.ts @@ -20,7 +20,6 @@ export default function useFetch(fetch: (params: P) => Promise, setIsSuccess(!!data); } catch (error) { setIsError(true); - console.error(error); if (showError) { showBoundary(error); } diff --git a/client/src/utils/getMsTime.ts b/client/src/utils/getMsTime.ts index b5e4eefa..8d6ffb39 100644 --- a/client/src/utils/getMsTime.ts +++ b/client/src/utils/getMsTime.ts @@ -2,7 +2,6 @@ export function getMsTime(dateString: string) { const date = new Date(dateString); if (isNaN(date.getTime())) { - console.error(`Invalid date string: ${dateString}`); return -1; } diff --git a/client/src/utils/saveDomImage.ts b/client/src/utils/saveDomImage.ts index 63b20df5..c733836f 100644 --- a/client/src/utils/saveDomImage.ts +++ b/client/src/utils/saveDomImage.ts @@ -18,6 +18,6 @@ export async function saveDomImage({ casperCustomDom, casperName }: SaveDomImage link.href = pngDataUrl; link.click(); } catch (error) { - console.error("Failed to save image:", error); + throw error; } } diff --git a/client/src/utils/writeClipboard.ts b/client/src/utils/writeClipboard.ts index 3257fd42..9c70ea2f 100644 --- a/client/src/utils/writeClipboard.ts +++ b/client/src/utils/writeClipboard.ts @@ -7,7 +7,6 @@ export async function writeClipboard( await navigator.clipboard.writeText(text); successCallback && successCallback(); } catch (err) { - console.error("Failed to copy: ", err); errorCallback && errorCallback(); } }