fix(brightdata): return error objects instead of throwing in postProcess · simstudioai/sim@b549ee4 · GitHub
Skip to content

Commit b549ee4

Browse files
waleedlatif1claude
andcommitted
fix(brightdata): return error objects instead of throwing in postProcess
The executor wraps postProcess in try-catch and falls back to the intermediate transformResponse result on error, which has success: true with empty results. Throwing errors would silently return empty results. Match Firecrawl's pattern: return { ...result, success: false, error } instead of throwing. Also add taskId to BrightDataDiscoverResponse type to eliminate unsafe casts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 17827e8 commit b549ee4

2 files changed

Lines changed: 74 additions & 42 deletions

File tree

apps/sim/tools/brightdata/discover.ts

Lines changed: 73 additions & 42 deletions

apps/sim/tools/brightdata/types.ts

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)