Skip to content

Commit 7d3106c

Browse files
committed
fix(dropbox): keep requiring path for an initial folder listing
1 parent fabea88 commit 7d3106c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/sim/tools/dropbox/list_folder.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export const dropboxListFolderTool: ToolConfig<DropboxListFolderParams, DropboxL
7272
body: (params) => {
7373
const cursor = params.cursor?.trim()
7474
if (cursor) return { cursor }
75-
const path = typeof params.path === 'string' ? params.path.trim() : ''
75+
if (typeof params.path !== 'string') {
76+
throw new Error('path is required unless cursor is set (use "" for the root folder)')
77+
}
78+
const path = params.path.trim()
7679
return {
7780
path: path === '/' ? '' : path,
7881
recursive: params.recursive ?? false,

0 commit comments

Comments
 (0)