mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web,server): link/unlink oauth account (#1154)
* feat(web,server): link/unlink oauth account * chore: linting * fix: broken oauth callback * fix: user core bugs * fix: tests * fix: use user response * chore: update docs * feat: prevent the same oauth account from being linked twice * chore: mock logger
This commit is contained in:
13
web/src/lib/utils/handle-error.ts
Normal file
13
web/src/lib/utils/handle-error.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ApiError } from '../../api';
|
||||
import {
|
||||
notificationController,
|
||||
NotificationType
|
||||
} from '../components/shared-components/notification/notification';
|
||||
|
||||
export function handleError(error: unknown, message: string) {
|
||||
console.error(`[handleError]: ${message}`, error);
|
||||
notificationController.show({
|
||||
message: (error as ApiError)?.response?.data?.message || message,
|
||||
type: NotificationType.Error
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user