mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore: suppress abort errors (#7120)
* chore: suppress abort errors * chore: return if aborted * chore: linting
This commit is contained in:
parent
747df0ae86
commit
b823dfffdc
2 changed files with 6 additions and 3 deletions
|
|
@ -232,6 +232,10 @@ export class AssetStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bucket.cancelToken.signal.aborted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bucket.assets = assets;
|
bucket.assets = assets;
|
||||||
|
|
||||||
this.emit(true);
|
this.emit(true);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import axios from 'axios';
|
|
||||||
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
|
|
||||||
import type { HttpError } from '@sveltejs/kit';
|
import type { HttpError } from '@sveltejs/kit';
|
||||||
|
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
|
||||||
|
|
||||||
export async function getServerErrorMessage(error: unknown) {
|
export async function getServerErrorMessage(error: unknown) {
|
||||||
let data = (error as HttpError)?.body;
|
let data = (error as HttpError)?.body;
|
||||||
|
|
@ -17,7 +16,7 @@ export async function getServerErrorMessage(error: unknown) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function handleError(error: unknown, message: string) {
|
export async function handleError(error: unknown, message: string) {
|
||||||
if (axios.isCancel(error)) {
|
if ((error as Error)?.name === 'AbortError') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue