Add error logging for database connection failures and Pokémon retrieval

This commit is contained in:
vista-man
2025-03-25 13:59:32 +01:00
parent 8388831301
commit 2c79be3ef4
2 changed files with 12 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ async function fetchPokemonDataBeforeRedirect(id) {
return true;
} catch (error) {
console.error("Failed to fetch Pokémon data before redirect:", error);
console.error(`Failed to fetch Pokémon data before redirect for ID ${id}:`, error);
return false;
}
}