Adding sql try/catch logging
This commit is contained in:
parent
3120502c17
commit
34ea5a1a6b
@ -298,6 +298,7 @@ const safelyQueryPhotos = async <T>(callback: () => Promise<T>): Promise<T> => {
|
|||||||
await sqlCreatePhotosTable();
|
await sqlCreatePhotosTable();
|
||||||
result = await callback();
|
result = await callback();
|
||||||
} else if (/endpoint is in transition/i.test(e.message)) {
|
} 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
|
// Wait 5 seconds and try again
|
||||||
await new Promise(resolve => setTimeout(resolve, 5000));
|
await new Promise(resolve => setTimeout(resolve, 5000));
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user