Skip to content

Commit 719e3e8

Browse files
committed
fix(tools): gracefully handle missing context in custom tool DB lookup
1 parent 74af452 commit 719e3e8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

apps/sim/tools/utils.server.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ async function fetchCustomToolFromDB(
110110
const identifier = customToolId.replace('custom_', '')
111111

112112
if (!userId) {
113-
throw new Error(`Cannot fetch custom tool without userId: ${identifier}`)
114-
}
115-
if (!workspaceId) {
116-
throw new Error(`Cannot fetch custom tool without workspaceId: ${identifier}`)
113+
logger.error(`Cannot fetch custom tool without userId: ${identifier}`)
114+
return undefined
117115
}
118116

119117
try {

0 commit comments

Comments
 (0)