Skip to content

Commit b8b7191

Browse files
author
Theodore Li
committed
Make userId and workspaceId required
1 parent e6db3db commit b8b7191

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

apps/sim/tools/utils.server.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const logger = createLogger('ToolsUtils')
1616

1717
export interface GetToolAsyncContext {
1818
workflowId?: string
19-
userId?: string
20-
workspaceId?: string
19+
userId: string
20+
workspaceId: string
2121
}
2222

2323
/**
@@ -110,11 +110,6 @@ async function fetchCustomToolFromDB(
110110
const identifier = customToolId.replace('custom_', '')
111111

112112
try {
113-
if (!userId) {
114-
logger.error(`Cannot fetch custom tool without userId: ${identifier}`)
115-
return undefined
116-
}
117-
118113
const customTool = await getCustomToolByIdOrTitle({
119114
identifier,
120115
userId,

0 commit comments

Comments
 (0)