|
|
@@ -1,3 +1,4 @@
|
|
|
+import { ErrorV3 } from '@growi/core';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import useSWR, { SWRConfiguration, SWRResponse } from 'swr';
|
|
|
|
|
|
@@ -10,6 +11,7 @@ import { apiv3Get, apiv3Put } from '../client/util/apiv3-client';
|
|
|
|
|
|
import { useStaticSWR } from './use-static-swr';
|
|
|
|
|
|
+
|
|
|
const logger = loggerFactory('growi:stores:personal-settings');
|
|
|
|
|
|
|
|
|
@@ -66,9 +68,9 @@ export const usePersonalSettings = (config?: SWRConfiguration): SWRResponse<IUse
|
|
|
await apiv3Put('/personal-setting/', updateData);
|
|
|
i18n.changeLanguage(updateData.lang);
|
|
|
}
|
|
|
- catch (err) {
|
|
|
- logger.error(err);
|
|
|
- throw new Error('Failed to update personal data');
|
|
|
+ catch (errs) {
|
|
|
+ logger.error(errs);
|
|
|
+ throw errs;
|
|
|
}
|
|
|
};
|
|
|
|