Delete will now retry and no longer needs Axios. Code clean up. Bug fix when deleting a Journal Entry.

This commit is contained in:
Scott Idem
2025-05-07 18:12:43 -04:00
parent 86221e6aec
commit 2ff7b4fd70
4 changed files with 125 additions and 52 deletions

View File

@@ -189,12 +189,17 @@ export let get_object = async function get_object(
}
}
} catch (error) {
// if (log_lvl) {
console.log(`API GET object request *fetch* error on attempt ${attempt}:`, error);
// }
console.log(`API GET object request *fetch* error on attempt ${attempt}:`, error);
if (attempt === retry_count) {
console.log('Max retry attempts reached. Returning false.');
return false;
}
// Log retry information
if (log_lvl) {
console.log(`Retrying... (${attempt}/${retry_count})`);
}
}
}
};