backend: Improve error logging for missing security and webhook preferences
This commit is contained in:
parent
b98d4d0cd9
commit
f841f55c71
@ -33,7 +33,7 @@ export const login = async (req: Request, res: Response) => {
|
||||
refreshToken,
|
||||
getCookieOptions(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/auth`, MEET_REFRESH_TOKEN_EXPIRATION)
|
||||
);
|
||||
logger.info(`Login succeeded for user ${username}`);
|
||||
logger.info(`Login succeeded for user '${username}'`);
|
||||
return res.status(200).json({ message: 'Login succeeded' });
|
||||
} catch (error) {
|
||||
logger.error('Error generating token' + error);
|
||||
|
||||
@ -48,6 +48,8 @@ export const getSecurityPreferences = async (_req: Request, res: Response) => {
|
||||
const preferences = await preferenceService.getGlobalPreferences();
|
||||
|
||||
if (!preferences) {
|
||||
//TODO: Create OpenViduMeetError for this case
|
||||
logger.error('Security preferences not found');
|
||||
return res.status(404).json({ message: 'Security preferences not found' });
|
||||
}
|
||||
|
||||
|
||||
@ -36,6 +36,8 @@ export const getWebhookPreferences = async (_req: Request, res: Response) => {
|
||||
const preferences = await preferenceService.getGlobalPreferences();
|
||||
|
||||
if (!preferences) {
|
||||
//TODO: Creare OpenViduMeetError for this case
|
||||
logger.error('Webhooks preferences not found');
|
||||
return res.status(404).json({ message: 'Webhooks preferences not found' });
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user