mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-01 13:22:04 -08:00
fix error handling for fetching div ids
This commit is contained in:
parent
57d05543df
commit
580711cdac
3 changed files with 21 additions and 5 deletions
|
|
@ -427,7 +427,10 @@ class ExtraNetworksTab {
|
|||
const timeout = EXTRA_NETWORKS_REQUEST_GET_TIMEOUT_MS;
|
||||
try {
|
||||
const response = await requestGetPromise(url, payload, timeout);
|
||||
return response.response;
|
||||
if (response.response.missing_div_ids.length) {
|
||||
console.warn(`Failed to fetch multiple div_ids: ${response.response.missing_div_ids}`);
|
||||
}
|
||||
return response.response.data;
|
||||
} catch (error) {
|
||||
console.error(JSON.stringify(error));
|
||||
return {};
|
||||
|
|
@ -447,7 +450,10 @@ class ExtraNetworksTab {
|
|||
const timeout = EXTRA_NETWORKS_REQUEST_GET_TIMEOUT_MS;
|
||||
try {
|
||||
const response = await requestGetPromise(url, payload, timeout);
|
||||
return response.response;
|
||||
if (response.response.missing_div_ids.length) {
|
||||
console.warn(`Failed to fetch multiple div_ids: ${response.response.missing_div_ids}`);
|
||||
}
|
||||
return response.response.data;
|
||||
} catch (error) {
|
||||
console.error(JSON.stringify(error));
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue