fix error notice

This commit is contained in:
fyears
2024-09-01 16:15:17 +08:00
parent dda304c857
commit fccebb0594
5 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -112,7 +112,9 @@ export const setConfigBySuccessfullAuthInplace = async (
saveUpdatedConfigFunc: () => Promise<any> | undefined
) => {
if (authRes.error !== undefined) {
throw Error(`you should not save the setting for ${authRes.error}`);
throw Error(
`remotely save account auth failed, please auth again: ${authRes.error}`
);
}
config.accessToken = authRes.access_token;
+1 -1
View File
@@ -112,7 +112,7 @@ export const setConfigBySuccessfullAuthInplace = async (
) => {
if (authRes.access_token === undefined || authRes.access_token === "") {
throw Error(
`you should not save the setting for ${JSON.stringify(authRes)}`
`remotely save account auth failed, please auth again: ${JSON.stringify(authRes)}`
);
}
+1 -1
View File
@@ -140,7 +140,7 @@ export const setConfigBySuccessfullAuthInplace = async (
) => {
if (authRes.access_token === undefined || authRes.access_token === "") {
throw Error(
`you should not save the setting for ${JSON.stringify(authRes)}`
`remotely save account auth failed, please auth again: ${JSON.stringify(authRes)}`
);
}
+3 -1
View File
@@ -99,7 +99,9 @@ export const setConfigBySuccessfullAuthInplace = async (
saveUpdatedConfigFunc: () => Promise<any> | undefined
) => {
if (authRes === undefined) {
throw Error(`you should not save the setting for undefined result`);
throw Error(
`remotely save account auth failed, please auth again: undefined result`
);
}
config.accessToken = authRes.access_token;
+1 -1
View File
@@ -127,7 +127,7 @@ export const setConfigBySuccessfullAuthInplace = async (
) => {
if (authRes.access_token === undefined || authRes.access_token === "") {
throw Error(
`you should not save the setting for ${JSON.stringify(authRes)}`
`remotely save account auth failed, please auth again: ${JSON.stringify(authRes)}`
);
}