Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: encode the webhook GET payload as UTF-8 so non-ASCII arguments work
  • Loading branch information
burrows99 committed Nov 15, 2026
commit 9b9e503ede4b895b0dd4e2dd6b7496b139cba1a2
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@
if (tokenType === 'query') params.push(`token=${token}`)
if (chat) params.push(`memory_id=${memory}`)
if (callMethod === 'get' || (tokenType === 'query' && requestType === 'sync_sse')) {
params.push(`payload=${encodeURIComponent(btoa(JSON.stringify(cleanedRunnableArgs ?? {})))}`)
// The server decodes the payload as UTF-8, and btoa only takes Latin-1 characters.
const bytes = new TextEncoder().encode(JSON.stringify(cleanedRunnableArgs ?? {}))
const binary = Array.from(bytes, (b) => String.fromCharCode(b)).join('')
params.push(`payload=${encodeURIComponent(btoa(binary))}`)
}
return baseWebhookUrl + (params.length ? `?${params.join('&')}` : '')
}
Expand Down
Loading