Skip to content

Commit c979c70

Browse files
committed
Merge branch 'lakees/tinybird' of https://github.com/lakeesiv/sim into lakees/tinybird
2 parents c9b0c2c + 254f799 commit c979c70

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/sim/blocks/blocks/tinybird.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ export const TinybirdBlock: BlockConfig<TinybirdResponse> = {
131131
result.format = params.format || 'ndjson'
132132
result.compression = params.compression || 'none'
133133

134+
// Convert wait from string to boolean
134135
// Convert wait from string to boolean
135136
if (params.wait !== undefined) {
136-
result.wait = params.wait === 'true' || params.wait === true || params.wait === 'True'
137+
const waitValue = typeof params.wait === 'string' ? params.wait.toLowerCase() : params.wait
138+
result.wait = waitValue === 'true' || waitValue === true
137139
}
138140
} else if (operation === 'tinybird_query') {
139141
// Query operation

apps/sim/tools/tinybird/query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export const queryTool: ToolConfig<TinybirdQueryParams, TinybirdQueryResponse> =
7878
const errorData = JSON.parse(responseText)
7979
errorMessage = errorData.error?.message || errorData.error || errorMessage
8080
} catch {
81-
// If not JSON, use raw text
82-
errorMessage = responseText || errorMessage
81+
// If not JSON, use raw text (truncated if too long)
82+
errorMessage = responseText ? responseText.substring(0, 500) : errorMessage
8383
}
8484
logger.error('Failed to execute Tinybird query', {
8585
status: response.status,

0 commit comments

Comments
 (0)