Copilot commented on code in PR #3721:
URL: https://github.com/apache/texera/pull/3721#discussion_r2334672687
##########
core/gui/src/app/hub/component/about/local-login/local-login.component.ts:
##########
@@ -98,7 +98,7 @@ export class LocalLoginComponent implements OnInit {
.login(username, password)
.pipe(
catchError((e: unknown) => {
- this.notificationService.error((e as Error).message, { nzDuration:
10 });
+ this.notificationService.error((e as Error).message);
Review Comment:
The error message should be validated or provided with a fallback. If `e` is
not an Error object or doesn't have a message property, this will display
'undefined' to the user. Consider using `e?.message || 'An unexpected error
occurred'` or similar fallback.
##########
core/gui/src/app/hub/component/about/local-login/local-login.component.ts:
##########
@@ -136,7 +136,7 @@ export class LocalLoginComponent implements OnInit {
.register(registerUsername, registerPassword)
.pipe(
catchError((e: unknown) => {
- this.notificationService.error((e as Error).message, { nzDuration:
10 });
+ this.notificationService.error((e as Error).message);
Review Comment:
The error message should be validated or provided with a fallback. If `e` is
not an Error object or doesn't have a message property, this will display
'undefined' to the user. Consider using `e?.message || 'An unexpected error
occurred'` or similar fallback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]