Skip to content

Commit 3c3bed1

Browse files
committed
fix(uploads): restore listWorkspaceFiles throwOnError option dropped in rebase
1 parent 1e2535c commit 3c3bed1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/sim/lib/uploads/contexts/workspace/workspace-file-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ interface ListWorkspaceFilesOptions {
8383
folders?: WorkspaceFileFolderRecord[]
8484
hydrateFolderPaths?: boolean
8585
includeReservedSystemFiles?: boolean
86+
/** Propagate storage errors when an incomplete list would be unsafe. */
87+
throwOnError?: boolean
8688
}
8789

8890
/**
@@ -801,6 +803,7 @@ export async function listWorkspaceFiles(
801803
})
802804
} catch (error) {
803805
logger.error(`Failed to list workspace files for ${workspaceId}:`, error)
806+
if (options?.throwOnError) throw error
804807
return []
805808
}
806809
}

0 commit comments

Comments
 (0)