File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/Shared/Components/Plugin Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export const getPluginsDetail = async ({
17
17
appId,
18
18
parentPluginIds,
19
19
pluginIds,
20
+ signal,
20
21
shouldShowError = true ,
21
22
} : PluginDetailServiceParamsType ) : Promise < Pick < GetPluginStoreDataReturnType , 'pluginStore' > > => {
22
23
try {
@@ -28,6 +29,7 @@ export const getPluginsDetail = async ({
28
29
29
30
const { result } = await get < PluginDetailDTO > (
30
31
getUrlWithSearchParams ( ROUTES . PLUGIN_GLOBAL_LIST_DETAIL_V2 , payload ) ,
32
+ { signal } ,
31
33
)
32
34
33
35
const pluginStore = parsePluginDetailsDTOIntoPluginStore ( result ?. parentPlugins )
@@ -36,7 +38,7 @@ export const getPluginsDetail = async ({
36
38
pluginStore,
37
39
}
38
40
} catch ( error ) {
39
- if ( shouldShowError ) {
41
+ if ( shouldShowError && ! getIsRequestAborted ( error ) ) {
40
42
showError ( error )
41
43
}
42
44
throw error
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export interface PluginDetailServiceParamsType {
69
69
* @default true
70
70
*/
71
71
shouldShowError ?: boolean
72
+ signal ?: AbortSignal
72
73
}
73
74
74
75
export interface PluginDetailPayloadType extends Pick < PluginDetailServiceParamsType , 'appId' > {
You can’t perform that action at this time.
0 commit comments