diff --git a/src/renderer/components/virtual-table/hooks/use-rating.ts b/src/renderer/components/virtual-table/hooks/use-rating.ts index 0d284c6f..9543dcfa 100644 --- a/src/renderer/components/virtual-table/hooks/use-rating.ts +++ b/src/renderer/components/virtual-table/hooks/use-rating.ts @@ -1,5 +1,5 @@ import { useQueryClient, useMutation } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { NDAlbumDetail, NDAlbumArtistDetail } from '/@/renderer/api/navidrome.types'; import { queryKeys } from '/@/renderer/api/query-keys'; @@ -22,7 +22,7 @@ export const useUpdateRating = () => { return useMutation< RatingResponse, - HTTPError, + AxiosError, Omit, { previous: { items: AnyLibraryItems } | undefined } >({ diff --git a/src/renderer/features/player/mutations/scrobble-mutation.ts b/src/renderer/features/player/mutations/scrobble-mutation.ts index 413782f3..33871af3 100644 --- a/src/renderer/features/player/mutations/scrobble-mutation.ts +++ b/src/renderer/features/player/mutations/scrobble-mutation.ts @@ -1,5 +1,5 @@ import { useMutation } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { ScrobbleResponse, ScrobbleArgs } from '/@/renderer/api/types'; import { MutationOptions } from '/@/renderer/lib/react-query'; @@ -10,7 +10,7 @@ export const useSendScrobble = (options?: MutationOptions) => { return useMutation< ScrobbleResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/playlists/mutations/add-to-playlist-mutation.ts b/src/renderer/features/playlists/mutations/add-to-playlist-mutation.ts index 8945374e..ecf63ce8 100644 --- a/src/renderer/features/playlists/mutations/add-to-playlist-mutation.ts +++ b/src/renderer/features/playlists/mutations/add-to-playlist-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { AddToPlaylistArgs, AddToPlaylistResponse } from '/@/renderer/api/types'; @@ -12,7 +12,7 @@ export const useAddToPlaylist = (args: MutationHookArgs) => { return useMutation< AddToPlaylistResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/playlists/mutations/create-playlist-mutation.ts b/src/renderer/features/playlists/mutations/create-playlist-mutation.ts index 9f0fd45c..98f0b1ee 100644 --- a/src/renderer/features/playlists/mutations/create-playlist-mutation.ts +++ b/src/renderer/features/playlists/mutations/create-playlist-mutation.ts @@ -1,9 +1,9 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; import { api } from '/@/renderer/api'; import { CreatePlaylistArgs, CreatePlaylistResponse } from '/@/renderer/api/types'; import { MutationHookArgs } from '/@/renderer/lib/react-query'; import { getServerById } from '/@/renderer/store'; +import { AxiosError } from 'axios'; import { queryKeys } from '../../../api/query-keys'; export const useCreatePlaylist = (args: MutationHookArgs) => { @@ -12,7 +12,7 @@ export const useCreatePlaylist = (args: MutationHookArgs) => { return useMutation< CreatePlaylistResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/playlists/mutations/delete-playlist-mutation.ts b/src/renderer/features/playlists/mutations/delete-playlist-mutation.ts index eebde576..d343dc8b 100644 --- a/src/renderer/features/playlists/mutations/delete-playlist-mutation.ts +++ b/src/renderer/features/playlists/mutations/delete-playlist-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { DeletePlaylistArgs, DeletePlaylistResponse } from '/@/renderer/api/types'; @@ -13,7 +13,7 @@ export const useDeletePlaylist = (args: MutationHookArgs) => { return useMutation< DeletePlaylistResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/playlists/mutations/remove-from-playlist-mutation.ts b/src/renderer/features/playlists/mutations/remove-from-playlist-mutation.ts index 51c71124..b5175252 100644 --- a/src/renderer/features/playlists/mutations/remove-from-playlist-mutation.ts +++ b/src/renderer/features/playlists/mutations/remove-from-playlist-mutation.ts @@ -1,8 +1,8 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; -import { RemoveFromPlaylistResponse, RemoveFromPlaylistArgs } from '/@/renderer/api/types'; +import { RemoveFromPlaylistArgs, RemoveFromPlaylistResponse } from '/@/renderer/api/types'; import { MutationOptions } from '/@/renderer/lib/react-query'; import { getServerById } from '/@/renderer/store'; @@ -11,7 +11,7 @@ export const useRemoveFromPlaylist = (options?: MutationOptions) => { return useMutation< RemoveFromPlaylistResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/playlists/mutations/update-playlist-mutation.ts b/src/renderer/features/playlists/mutations/update-playlist-mutation.ts index 58f0afd5..4d706d05 100644 --- a/src/renderer/features/playlists/mutations/update-playlist-mutation.ts +++ b/src/renderer/features/playlists/mutations/update-playlist-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { UpdatePlaylistArgs, UpdatePlaylistResponse } from '/@/renderer/api/types'; @@ -12,7 +12,7 @@ export const useUpdatePlaylist = (args: MutationHookArgs) => { return useMutation< UpdatePlaylistResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/shared/mutations/create-favorite-mutation.ts b/src/renderer/features/shared/mutations/create-favorite-mutation.ts index 8eb38b62..91b139c1 100644 --- a/src/renderer/features/shared/mutations/create-favorite-mutation.ts +++ b/src/renderer/features/shared/mutations/create-favorite-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { @@ -20,7 +20,7 @@ export const useCreateFavorite = (args: MutationHookArgs) => { return useMutation< FavoriteResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/shared/mutations/delete-favorite-mutation.ts b/src/renderer/features/shared/mutations/delete-favorite-mutation.ts index f386f3dc..f4874e0d 100644 --- a/src/renderer/features/shared/mutations/delete-favorite-mutation.ts +++ b/src/renderer/features/shared/mutations/delete-favorite-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { @@ -20,7 +20,7 @@ export const useDeleteFavorite = (args: MutationHookArgs) => { return useMutation< FavoriteResponse, - HTTPError, + AxiosError, Omit, null >({ diff --git a/src/renderer/features/shared/mutations/set-rating-mutation.ts b/src/renderer/features/shared/mutations/set-rating-mutation.ts index 6f77a70a..bf7b8f99 100644 --- a/src/renderer/features/shared/mutations/set-rating-mutation.ts +++ b/src/renderer/features/shared/mutations/set-rating-mutation.ts @@ -1,5 +1,5 @@ import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { HTTPError } from 'ky'; +import { AxiosError } from 'axios'; import { api } from '/@/renderer/api'; import { queryKeys } from '/@/renderer/api/query-keys'; import { @@ -23,7 +23,7 @@ export const useSetRating = (args: MutationHookArgs) => { return useMutation< RatingResponse, - HTTPError, + AxiosError, Omit, { previous: { items: AnyLibraryItems } | undefined } >({