1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-25 13:12:46 +01:00
immich/web/src/lib/utils/handle-error.ts
Jason Rasmussen 7dc12dea1e
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
2022-12-26 09:35:52 -06:00

13 lines
411 B
TypeScript

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
});
}