Adding sql try/catch logging

This commit is contained in:
Sam Becker 2024-02-29 23:10:29 -06:00
parent 3120502c17
commit 34ea5a1a6b

View File

@ -298,6 +298,7 @@ const safelyQueryPhotos = async <T>(callback: () => Promise<T>): Promise<T> => {
await sqlCreatePhotosTable();
result = await callback();
} else if (/endpoint is in transition/i.test(e.message)) {
console.log('sql get error: endpoint is in transition (setting timeout)');
// Wait 5 seconds and try again
await new Promise(resolve => setTimeout(resolve, 5000));
try {