Skip to content

Commit 5c6a70b

Browse files
fix(enrichments): treat provider 404 as no-match, not a cell error
Providers like People Data Labs signal 'no record found' with HTTP 404, which executeTool surfaces as a failed ToolResponse (status on output.status). The cascade now treats a 404 as a clean miss — falls through to the next provider and lets the cell render 'Not found' — instead of marking the cell errored. Auth/rate-limit/5xx still propagate as real errors.
1 parent a3c92ea commit 5c6a70b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

apps/sim/enrichments/run.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ export async function runEnrichment(
6464
{ signal: ctx.signal }
6565
)
6666
if (!response.success) {
67+
// A 404 means the provider simply has no record for these inputs — a
68+
// clean no-match, not an infra failure. Fall through to the next
69+
// provider without counting it as an error (so the cell shows "Not
70+
// found" rather than an error). Other statuses (auth, rate-limit, 5xx)
71+
// are real errors and propagate.
72+
const status = (response.output as { status?: unknown } | undefined)?.status
73+
if (status === 404) continue
6774
throw new Error(response.error ?? `${provider.toolId} failed`)
6875
}
6976
cost += readCost(response.output)

0 commit comments

Comments
 (0)