refactor: gestion des erreurs

This commit is contained in:
Luc SORIGNET
2025-03-01 17:52:47 +01:00
parent d1a0067f7b
commit f3490a4e95
14 changed files with 136 additions and 38 deletions

View File

@ -26,9 +26,9 @@ const options = {
logger.debug("API response:", user);
return user;
}
throw new Error('Invalid credentials');
logger.error('Invalid credentials')
} catch (error) {
logger.error('Invalid credentials')
throw new Error(error.message || 'Invalid credentials');
}
}