Skip to content

Commit

Permalink
Add some info to make logs easier to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Feb 19, 2025
1 parent 40ee813 commit 9233722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/api/v1/hibp/notify/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export async function POST(req: NextRequest) {

const headerToken = bearerToken(req);
if (headerToken !== process.env.HIBP_NOTIFY_TOKEN) {
logger.error(`Received invalid header token: [${headerToken}]`);
return NextResponse.json({ success: false }, { status: 401 });
}

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/cronjobs/emailBreachAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export async function poll(
/* c8 ignore next 6 */
if (!breachAlert) {
console.error(
"HIBP breach notification: couldn't find the breach to notify about.",
`HIBP breach notification: couldn't find the breach to notify about: [${breachName}].`,
);
continue;
}
Expand Down

0 comments on commit 9233722

Please sign in to comment.