Move error handling out of api.ts to workflows.ts (#600)

This commit is contained in:
Chenlei Hu
2024-08-22 20:21:31 -04:00
committed by GitHub
parent 60221254d9
commit 233fd1347e
2 changed files with 15 additions and 17 deletions

View File

@@ -541,11 +541,7 @@ class ComfyApi extends EventTarget {
const resp = await this.fetchApi(`/userdata/${encodeURIComponent(file)}`, {
method: 'DELETE'
})
if (resp.status !== 204) {
throw new Error(
`Error removing user data file '${file}': ${resp.status} ${resp.statusText}`
)
}
return resp
}
/**