Skip to content

Commit 8ad7d0e

Browse files
committed
fix(wiza): throw on invalid JSON in advanced filter fields instead of silently dropping
1 parent dc7bab0 commit 8ad7d0e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/sim/blocks/blocks/wiza.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,10 @@ export const WizaBlock: BlockConfig<WizaResponse> = {
341341
if (typeof value === 'string' && value.trim() !== '') {
342342
try {
343343
parsed[field] = JSON.parse(value)
344-
} catch {
345-
// Leave as-is if not valid JSON; tool may still accept the string
344+
} catch (err) {
345+
throw new Error(
346+
`Invalid JSON in Wiza "${field}" filter: ${err instanceof Error ? err.message : String(err)}`
347+
)
346348
}
347349
}
348350
}

0 commit comments

Comments
 (0)