1
1
import { ref , computed , reactive } from 'vue'
2
2
import { defineStore } from 'pinia'
3
3
import { Platform } from 'quasar'
4
+ import type { AxiosError } from 'axios'
4
5
import { isProd , isDebug } from 'shared/config'
5
6
// import asyncSleep from 'simple-async-sleep'
6
7
import { FlipperModel } from 'entity/Flipper'
@@ -12,6 +13,7 @@ import { showNotif } from 'shared/lib/utils/useShowNotif'
12
13
import { logger } from 'shared/lib/utils/useLog'
13
14
14
15
// import { instance } from 'boot/axios'
16
+ import type { ApiErrorDetail } from 'shared/types/api'
15
17
import { App , InstalledApp , AppsPostShortParams , ActionType } from './types'
16
18
import { api } from '../api'
17
19
const { fetchAppsVersions, fetchPostAppsShort /* , fetchAppFap */ } = api
@@ -140,6 +142,12 @@ export const useAppsStore = defineStore('apps', () => {
140
142
actualApps = await fetchPostAppsShort ( {
141
143
...params ,
142
144
applications : installed . map ( ( app ) => app . id )
145
+ } ) . catch ( ( error : AxiosError < ApiErrorDetail > ) => {
146
+ if ( error . response ?. data . detail . code === 1001 ) {
147
+ flags . catalogIsUnknownSDK = true
148
+ }
149
+
150
+ return error
143
151
} )
144
152
} while ( actualApps . length === params . limit )
145
153
0 commit comments