mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: update error handling to match new API (#7117)
This commit is contained in:
parent
6adff50f0a
commit
2906950188
3 changed files with 4 additions and 7 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import type { ApiError } from '$lib/utils';
|
||||
import axios from 'axios';
|
||||
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
|
||||
import type { HttpError } from '@sveltejs/kit';
|
||||
|
||||
export async function getServerErrorMessage(error: unknown) {
|
||||
let data = (error as ApiError)?.response?.data;
|
||||
let data = (error as HttpError)?.body;
|
||||
if (data instanceof Blob) {
|
||||
const response = await data.text();
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue