forked from trent_larson/crowd-funder-for-time-pwa
add a input area for arbitrary SQL on the test page
This commit is contained in:
@@ -144,9 +144,8 @@ export async function updateDefaultSettings(
|
||||
// console.log("Database version:", db.verno);
|
||||
await safeOpenDatabase();
|
||||
} catch (openError: unknown) {
|
||||
console.error("Failed to open database:", openError);
|
||||
const errorMessage = openError instanceof Error ? openError.message : String(openError);
|
||||
throw new Error(`Database connection failed: ${errorMessage}. Please try again or restart the app.`);
|
||||
console.error("Failed to open database:", openError, String(openError));
|
||||
throw new Error(`The database connection failed. We recommend you try again or restart the app.`);
|
||||
}
|
||||
const result = await db.settings.update(MASTER_SETTINGS_KEY, settingsChanges);
|
||||
return result;
|
||||
@@ -155,7 +154,7 @@ export async function updateDefaultSettings(
|
||||
if (error instanceof Error) {
|
||||
throw error; // Re-throw if it's already an Error with a message
|
||||
} else {
|
||||
throw new Error(`Failed to update settings: ${error}`);
|
||||
throw new Error(`Failed to update settings. We recommend you try again or restart the app.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user