Skip to content

Commit 0baadc2

Browse files
committed
Merge branch 'main' of https://github.com/MotiaDev/motia into Fixes/Build-Fails-on-Windows-Due-to-Unix-Shell-Commands-sidd
2 parents a2a5a17 + 128dc83 commit 0baadc2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/server.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,13 @@ export const createServer = (
190190
}
191191

192192
res.status(result.status)
193-
res.json(result.body)
193+
194+
// Handle different body types
195+
if (Buffer.isBuffer(result.body) || typeof result.body === 'string') {
196+
res.send(result.body)
197+
} else {
198+
res.json(result.body)
199+
}
194200
} catch (error) {
195201
trackEvent('api_call_error', {
196202
stepName,

0 commit comments

Comments
 (0)