From 832692c8af92fc69ea4acf9836e3fd33aa3c669c Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 21 Dec 2022 10:35:59 -0500 Subject: [PATCH] chore(web): linting (#1152) --- .../components/user-settings-page/user-settings-list.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/lib/components/user-settings-page/user-settings-list.svelte b/web/src/lib/components/user-settings-page/user-settings-list.svelte index 0f2589dfdd..83aab28d71 100644 --- a/web/src/lib/components/user-settings-page/user-settings-list.svelte +++ b/web/src/lib/components/user-settings-page/user-settings-list.svelte @@ -11,6 +11,8 @@ SettingInputFieldType } from '../admin-page/settings/setting-input-field.svelte'; + type ApiError = AxiosError<{ message: string }>; + export let user: UserResponseDto; const handleSaveProfile = async () => { @@ -55,10 +57,10 @@ password = ''; newPassword = ''; confirmPassword = ''; - } catch (error: AxiosError | any) { + } catch (error) { console.error('Error [user-profile] [changePassword]', error); notificationController.show({ - message: error?.response?.data?.message || 'Unable to change password', + message: (error as ApiError)?.response?.data?.message || 'Unable to change password', type: NotificationType.Error }); }