Improved error logging

This commit is contained in:
La Programmatrice Verde
2025-08-21 22:17:38 +02:00
parent 3d6ee7698b
commit 407a428795
2 changed files with 6 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ async function getUserID() {
return response.data.id;
} catch (error) {
Log(`[${shared.now()}] ${error}`);
Log(`[${shared.now()}] Errore nel reperire l'ID dell'utente corrente`);
process.exit(3);
}
}
@@ -55,6 +56,7 @@ async function deleteToken(tokenID) {
Log(`[${shared.now()}] Token con ID ${tokenID} cancellato con successo`);
} catch (error) {
Log(`[${shared.now()}] ${error}`);
Log(`[${shared.now()}] Errore nella cancellazione del token con ID ${tokenID}`);
process.exit(3);
}
}
@@ -78,6 +80,7 @@ async function getCurrentTokenID() {
return token.id;
} catch (error) {
Log(`[${shared.now()}] ${error}`);
Log(`[${shared.now()}] Errore nel reperire il token corrente`);
process.exit(3);
}
}
@@ -102,6 +105,7 @@ async function getNewToken() {
return response.data.plain_token;
} catch (error) {
Log(`[${shared.now()}] ${error}`);
Log(`[${shared.now()}] Errore nella creazione di un nuovo token`);
process.exit(3);
}
}