We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f35179 commit e29e2b9Copy full SHA for e29e2b9
apps/sim/tools/firecrawl/scrape.ts
@@ -39,11 +39,10 @@ export const scrapeTool: ToolConfig<ScrapeParams, ScrapeResponse> = {
39
type: 'custom',
40
getCost: (_params, output) => {
41
const creditsUsed = (output.metadata as { creditsUsed?: number })?.creditsUsed
42
- if (creditsUsedString == null) {
+ if (creditsUsed == null) {
43
throw new Error('Firecrawl response missing creditsUsed field')
44
}
45
46
- const creditsUsed = Number(creditsUsedString)
47
if (Number.isNaN(creditsUsed)) {
48
throw new Error('Firecrawl response returned a non-numeric creditsUsed field')
49
0 commit comments