From edee7c4de856eea1f694fbcf440c38d19fafd3f0 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Mon, 4 Aug 2025 10:10:25 +0200 Subject: [PATCH] fix: upgrade axios --- ui/package.json | 2 +- ui/src/CurrentUser.ts | 3 ++- ui/yarn.lock | 9 +-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ui/package.json b/ui/package.json index d53f8ee..a72208e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -13,7 +13,7 @@ "@uiw/codemirror-theme-material": "^4.24.2", "@uiw/react-codemirror": "^4.24.2", "@vitejs/plugin-react": "^4.7.0", - "axios": "^0.21.1", + "axios": "^1.11.0", "detect-browser": "^5.3.0", "mobx": "^5.15.6", "mobx-react": "^6.3.0", diff --git a/ui/src/CurrentUser.ts b/ui/src/CurrentUser.ts index f0faa44..34e2e0a 100644 --- a/ui/src/CurrentUser.ts +++ b/ui/src/CurrentUser.ts @@ -50,12 +50,13 @@ export class CurrentUser { this.login(name, pass); return true; }) - .catch((error: AxiosError) => { + .catch((error: AxiosError<{error?: string; errorDescription?: string}>) => { if (!error || !error.response) { this.snack('No network connection or server unavailable.'); return false; } const {data} = error.response; + this.snack( `Register failed: ${data?.error ?? 'unknown'}: ${data?.errorDescription ?? ''}` ); diff --git a/ui/yarn.lock b/ui/yarn.lock index a85bbe3..6f87b9b 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -1856,13 +1856,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - axios@^1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/axios/-/axios-1.11.0.tgz#c2ec219e35e414c025b2095e8b8280278478fdb6" @@ -2538,7 +2531,7 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== -follow-redirects@^1.14.0, follow-redirects@^1.15.6: +follow-redirects@^1.15.6: version "1.15.11" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==