Skip to content

Commit 3ab4d8d

Browse files
committed
fix(slack): fix download fileName param and canvas error handling
1 parent 8e77cb0 commit 3ab4d8d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

apps/sim/blocks/blocks/slack.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,10 +1025,10 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
10251025

10261026
case 'download': {
10271027
const fileId = (rest as any).fileId
1028-
const downloadFileName = (rest as any).downloadFileName
1028+
const fileName = (rest as any).fileName
10291029
baseParams.fileId = fileId
1030-
if (downloadFileName) {
1031-
baseParams.fileName = downloadFileName
1030+
if (fileName) {
1031+
baseParams.fileName = fileName
10321032
}
10331033
break
10341034
}

apps/sim/tools/slack/canvas.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ export const slackCanvasTool: ToolConfig<SlackCanvasParams, SlackCanvasResponse>
9090
transformResponse: async (response: Response) => {
9191
const data = await response.json()
9292

93+
if (!data.ok) {
94+
return {
95+
success: false,
96+
output: {
97+
error: data.error || 'Unknown error',
98+
},
99+
}
100+
}
101+
93102
return {
94103
success: true,
95104
output: {

0 commit comments

Comments
 (0)