diff --git a/src/main/services/download/python-instance.ts b/src/main/services/download/python-instance.ts index f59b20b8..146c6553 100644 --- a/src/main/services/download/python-instance.ts +++ b/src/main/services/download/python-instance.ts @@ -174,8 +174,10 @@ export class PythonInstance { .then((response) => response.data); } - private static async handleRpcError(_error: unknown) { - await this.rpc.get("/healthcheck").catch(() => { + private static async handleRpcError(error: unknown) { + logger.error(error); + + return this.rpc.get("/healthcheck").catch(() => { logger.error( "RPC healthcheck failed. Killing process and starting again" ); diff --git a/src/main/services/hydra-api.ts b/src/main/services/hydra-api.ts index f642f43b..bac1486a 100644 --- a/src/main/services/hydra-api.ts +++ b/src/main/services/hydra-api.ts @@ -153,21 +153,26 @@ export class HydraApi { (error) => { logger.error(" ---- RESPONSE ERROR -----"); const { config } = error; + const data = JSON.parse(config.data); + logger.error( config.method, config.baseURL, config.url, - config.headers, - config.data + omit(config.headers, ["accessToken", "refreshToken"]), + Array.isArray(data) + ? data + : omit(data, ["accessToken", "refreshToken"]) ); if (error.response) { logger.error( - "Response", + "Response error:", error.response.status, error.response.data ); } else if (error.request) { - logger.error("Request", error.request); + const errorData = error.toJSON(); + logger.error("Request error:", errorData.message); } else { logger.error("Error", error.message); } diff --git a/src/main/services/user/get-user-data.ts b/src/main/services/user/get-user-data.ts index fd4e5e1d..ff012881 100644 --- a/src/main/services/user/get-user-data.ts +++ b/src/main/services/user/get-user-data.ts @@ -44,7 +44,7 @@ export const getUserData = () => { if (err instanceof UserNotLoggedInError) { return null; } - logger.error("Failed to get logged user", err); + logger.error("Failed to get logged user"); const loggedUser = await userAuthRepository.findOne({ where: { id: 1 }, relations: { subscription: true }, diff --git a/src/main/services/window-manager.ts b/src/main/services/window-manager.ts index 4f65ef2a..9befa709 100644 --- a/src/main/services/window-manager.ts +++ b/src/main/services/window-manager.ts @@ -85,7 +85,11 @@ export class WindowManager { return callback(details); } - if (details.url.includes("intercom.io")) { + if (details.url.includes("featurebase")) { + return callback(details); + } + + if (details.url.includes("chatwoot")) { return callback(details); }