Skip to content

OauthPopup: Typo "occured" and incorrect log level in error handlers #5053

@NAME-ASHWANIYADAV

Description

@NAME-ASHWANIYADAV

The OauthPopup component has two error catch blocks with the following issues:

  1. Typo: "occured" should be "occurred" (missing 'r')
  2. Wrong log level: console.log is used instead of console.error for error handling
  3. Inconsistent capitalization: Error messages don't follow standard capitalization

File: frontend/src/components/oidcauth/OauthPopup.tsx

Line 75 (current):

console.log('error occured while closing auth window', e);

Line 94 (current):

console.log('error occured while adding beforeunload event listener');

Using console.log for errors means they won't appear under the "Errors" filter in browser DevTools, making debugging harder.

To Reproduce

  1. Open frontend/src/components/oidcauth/OauthPopup.tsx
  2. See line 75 and line 94: both have the typo "occured" and use console.log

Environment

  • Installation type: Source (reviewing codebase on main branch)
  • Headlamp Version: latest main

Are you able to fix this issue?

Yes, I will propose a PR with the fix.

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions