Skip to content

Commit 3fcd298

Browse files
waleedlatif1claude
andcommitted
fix(findymail): surface API .error messages and alphabetize registry
- transformResponse error branches now fall back to the response body's `error` field before the generic status string, so Findymail's actual messages ("Not enough credits" on 402, "Subscription is paused" on 423, "One identifier is required..." on 422) reach the user instead of a bare "Findymail API error: <status>". Applied to all 11 tools. - alphabetize the findymail entries in tools/registry.ts to match the already-alphabetical import block and the integration guideline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f466a20 commit 3fcd298

12 files changed

Lines changed: 17 additions & 6 deletions

apps/sim/tools/findymail/find_email_from_linkedin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const findEmailFromLinkedInTool: ToolConfig<
4949
success: false,
5050
error:
5151
(errorData as Record<string, string>).message ||
52+
(errorData as Record<string, string>).error ||
5253
`Findymail API error: ${response.status} ${response.statusText}`,
5354
output: { contact: null },
5455
}

apps/sim/tools/findymail/find_email_from_name.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export const findEmailFromNameTool: ToolConfig<
5454
success: false,
5555
error:
5656
(errorData as Record<string, string>).message ||
57+
(errorData as Record<string, string>).error ||
5758
`Findymail API error: ${response.status} ${response.statusText}`,
5859
output: { contact: null },
5960
}

apps/sim/tools/findymail/find_emails_by_domain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export const findEmailsByDomainTool: ToolConfig<
5555
success: false,
5656
error:
5757
(errorData as Record<string, string>).message ||
58+
(errorData as Record<string, string>).error ||
5859
`Findymail API error: ${response.status} ${response.statusText}`,
5960
output: { contacts: [] },
6061
}

apps/sim/tools/findymail/find_employees.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const findEmployeesTool: ToolConfig<
6868
success: false,
6969
error:
7070
(errorData as Record<string, string>).message ||
71+
(errorData as Record<string, string>).error ||
7172
`Findymail API error: ${response.status} ${response.statusText}`,
7273
output: { employees: [] },
7374
}

apps/sim/tools/findymail/find_phone.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const findPhoneTool: ToolConfig<FindymailFindPhoneParams, FindymailFindPh
4242
success: false,
4343
error:
4444
(errorData as Record<string, string>).message ||
45+
(errorData as Record<string, string>).error ||
4546
`Findymail API error: ${response.status} ${response.statusText}`,
4647
output: { phone: null, line_type: null },
4748
}

apps/sim/tools/findymail/get_company.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const getCompanyTool: ToolConfig<FindymailGetCompanyParams, FindymailGetC
6262
success: false,
6363
error:
6464
(errorData as Record<string, string>).message ||
65+
(errorData as Record<string, string>).error ||
6566
`Findymail API error: ${response.status} ${response.statusText}`,
6667
output: {
6768
name: null,

apps/sim/tools/findymail/get_credits.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const getCreditsTool: ToolConfig<FindymailGetCreditsParams, FindymailGetC
3535
success: false,
3636
error:
3737
(errorData as Record<string, string>).message ||
38+
(errorData as Record<string, string>).error ||
3839
`Findymail API error: ${response.status} ${response.statusText}`,
3940
output: { credits: 0, verifier_credits: 0 },
4041
}

apps/sim/tools/findymail/lookup_technologies.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const lookupTechnologiesTool: ToolConfig<
6161
success: false,
6262
error:
6363
(errorData as Record<string, string>).message ||
64+
(errorData as Record<string, string>).error ||
6465
`Findymail API error: ${response.status} ${response.statusText}`,
6566
output: { domain: '', technologies: [] },
6667
}

apps/sim/tools/findymail/reverse_email_lookup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const reverseEmailLookupTool: ToolConfig<
5656
success: false,
5757
error:
5858
(errorData as Record<string, string>).message ||
59+
(errorData as Record<string, string>).error ||
5960
`Findymail API error: ${response.status} ${response.statusText}`,
6061
output: {
6162
email: null,

apps/sim/tools/findymail/search_technologies.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const searchTechnologiesTool: ToolConfig<
5050
success: false,
5151
error:
5252
(errorData as Record<string, string>).message ||
53+
(errorData as Record<string, string>).error ||
5354
`Findymail API error: ${response.status} ${response.statusText}`,
5455
output: { technologies: [] },
5556
}

0 commit comments

Comments
 (0)