diff --git a/package-lock.json b/package-lock.json index fabde3b4..6be1245e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "@vitejs/plugin-react": "^4.2.1", "auto-launch": "^5.0.6", "autoprefixer": "^10.4.17", - "axios": "^1.20.0", + "axios": "^1.6.7", "classnames": "^2.5.1", "clsx": "^2.1.0", "crypto-browserify": "^3.12.0", @@ -68,10 +68,10 @@ "rage-edit": "^1.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hook-form": "^7.88.0", + "react-hook-form": "^7.50.1", "react-i18next": "^12.1.5", "react-router-dom": "^6.21.3", - "rollup": "^4.63.3", + "rollup": "^4.12.1", "tailwind-merge": "^2.2.1", "tailwind-scrollbar": "^3.1.0", "tailwindcss": "^3.4.1", @@ -12703,9 +12703,9 @@ } }, "node_modules/socket.io-parser": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.6.tgz", - "integrity": "sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg==", + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.7.tgz", + "integrity": "sha512-IH/iSeO9T6gz1KkFleGDWkG9N3dl4jXVYUtMhIqH10Md0ttMer8nUNWiP1DKuNrybD2xBrixLJdCC9J6ECoYkg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/src/main/lib/ipcEvents.ts b/src/main/lib/ipcEvents.ts index 3db2950b..30c60f71 100644 --- a/src/main/lib/ipcEvents.ts +++ b/src/main/lib/ipcEvents.ts @@ -144,12 +144,15 @@ export function registerIpcEvents() { timeout: 3000 }, (res) => { - if (res.statusCode !== 200) { - triggerError(new Error('status error'), request) + const statusCode = res.statusCode ?? 0 + const isSuccess = (statusCode >= 200 && statusCode < 300) || statusCode === 302 + if (!isSuccess) { + triggerError(new Error(`status error: ${statusCode}`), request) + return } NethLinkController.instance.window.emit(IPC_EVENTS.RESPONSE_START_CALL_BY_URL, true) PhoneIslandController.instance.window.show() - Log.debug('START_CALL_BY_URL', url, res.statusCode) + Log.debug('START_CALL_BY_URL', url, statusCode) } )