fix: adding comprehensive logs for live server (#7947)
* fix: adding comprehensive logs * fix: document controller naming convention * fix: axios interception logger
This commit is contained in:
parent
9ce6179421
commit
8cd29c5009
10 changed files with 112 additions and 72 deletions
|
|
@ -36,7 +36,7 @@ export const onAuthenticate = async ({
|
|||
cookie = parsedToken.cookie;
|
||||
} catch (error) {
|
||||
// If token parsing fails, fallback to request headers
|
||||
logger.error("Token parsing failed, using request headers:", error);
|
||||
logger.error("AUTH: Token parsing failed, using request headers:", error);
|
||||
} finally {
|
||||
// If cookie is still not found, fallback to request headers
|
||||
if (!cookie) {
|
||||
|
|
@ -76,7 +76,8 @@ export const handleAuthentication = async ({ cookie, userId }: { cookie: string;
|
|||
name: user.display_name,
|
||||
},
|
||||
};
|
||||
} catch (_error) {
|
||||
} catch (error) {
|
||||
logger.error("AUTH: Token parsing failed, using request headers:", error);
|
||||
throw Error("Authentication unsuccessful!");
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue