Skip to content

Commit c4b699c

Browse files
authored
feat: fix (#1452)
1 parent ed2fdd0 commit c4b699c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

web/src/app/workspace/collections/[collectionId]/documents/upload/document-upload.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,10 @@ export const DocumentUpload = () => {
654654
<UrlImport
655655
onSuccess={(results) => {
656656
handleUrlImportSuccess(results);
657-
setUrlDialogOpen(false);
657+
// Only auto-close when every URL succeeded; keep open on partial failure
658+
// so the user can read the error details before dismissing.
659+
const hasFailures = results.some((r) => r.fetch_status === 'error');
660+
if (!hasFailures) setUrlDialogOpen(false);
658661
}}
659662
/>
660663
</DialogContent>

web/src/app/workspace/collections/[collectionId]/documents/upload/import/url-import.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ export const UrlImport = ({ onSuccess }: Props) => {
102102
setResults(null);
103103

104104
try {
105-
const res = await apiClient.defaultApi.collectionsCollectionIdDocumentsFetchUrlPost({
106-
collectionId: collection.id,
107-
fetchUrlRequest: { urls },
108-
});
105+
const res = await apiClient.defaultApi.collectionsCollectionIdDocumentsFetchUrlPost(
106+
{
107+
collectionId: collection.id,
108+
fetchUrlRequest: { urls },
109+
},
110+
{ timeout: 1000 * 60 },
111+
);
109112

110113
const fetchResults: UrlImportResult[] = (res.data.results as FetchUrlResultItem[]).map(
111114
(item) => ({

0 commit comments

Comments
 (0)