From dc9de7cacac4fef85090510d305abfc94d8b24a9 Mon Sep 17 00:00:00 2001 From: ceddybi Date: Tue, 13 Feb 2024 20:58:57 -0500 Subject: [PATCH] console.log --- src/api/index.ts | 10 +++++----- src/config/app.ts | 4 ++-- src/index.ts | 4 ++-- src/utils/state/index.ts | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index d3aea54..5caf543 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -64,7 +64,7 @@ export const getAuthApi = async (args: GetAuth): Promise => { } catch (error) { - console.error("Error getAuthApi", error); + console.log("Error getAuthApi", error?.message || ""); const newAuth = { ...state.auth, res: { message: error.message || "", success: false } }; await setState({ ...state, auth: newAuth }); return null; @@ -105,7 +105,7 @@ export const getMainApi = async (): Promise => { const resData: any = response.data; if (!resData.success) { const resMessage = _get(resData, "data.message", ""); - console.error("Error getMainApi", resMessage); + console.log("Error getMainApi", resMessage); await setState({ ...state, auth: { ...state.auth, res: { success: false, message: resMessage } } }); } @@ -113,7 +113,7 @@ export const getMainApi = async (): Promise => { } catch (error) { - console.error("Error getMainApi", error); + console.log("Error getMainApi", error?.message); return null; } @@ -149,14 +149,14 @@ export const getAppApi = async (): Promise => { if (!resData.success) { const resMessage = resData.message; - console.error("resData.success", resMessage); + console.log("resData.success", resMessage); await setState({ ...state, auth: { ...state.auth, res: { success: false, message: resMessage } } }); } return resData; } catch (error) { - console.error("Error getAppApi", error); + console.log("Error getAppApi", error?.message); return null; } diff --git a/src/config/app.ts b/src/config/app.ts index 546c1a8..71ac411 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -71,7 +71,7 @@ export const gotoMainPage = async (url: string) => { } catch (error) { - console.error("Error gotoAppPage", error); + console.log("Error gotoAppPage", error?.message); } } @@ -150,6 +150,6 @@ export const gotoAppPage = async (job: AppJob) => { } catch (error) { - console.error("Error gotoAppPage", error); + console.log("Error gotoAppPage", error?.message); } } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 34b2b68..e3e5f50 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,7 +56,7 @@ const getAppAuth = async (urlLinking?: string) => { } } catch (error) { - console.error("Error", error); + console.log("Error", error?.message); dialog.showErrorBox(error.message || "Error opening app", "Please try again"); } } @@ -214,7 +214,7 @@ async function runApplying(ondemandJob?: AppJob): Promise { } catch (error) { - console.error("Error startApplying", error); + console.log("Error startApplying", error?.message); return null; } finally { diff --git a/src/utils/state/index.ts b/src/utils/state/index.ts index fba8f07..ba89966 100644 --- a/src/utils/state/index.ts +++ b/src/utils/state/index.ts @@ -116,7 +116,7 @@ export const addJob = async (job: AppJob | AppJob[]): Promise => { } catch (error) { - console.error("error addJob", error); + console.log("error addJob", error?.message); return false; }