mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(slack): fix canvas transformResponse type mismatch
Provide required output fields on error path to match SlackCanvasResponse type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,13 +87,16 @@ export const slackCanvasTool: ToolConfig<SlackCanvasParams, SlackCanvasResponse>
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
transformResponse: async (response: Response) => {
|
transformResponse: async (response: Response): Promise<SlackCanvasResponse> => {
|
||||||
const data = await response.json()
|
const data = await response.json()
|
||||||
|
|
||||||
if (!data.ok) {
|
if (!data.ok) {
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
output: {
|
output: {
|
||||||
|
canvas_id: '',
|
||||||
|
channel: '',
|
||||||
|
title: '',
|
||||||
error: data.error || 'Unknown error',
|
error: data.error || 'Unknown error',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user