MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / getScraperErrorMessage

Function getScraperErrorMessage

js/botasaurus-server-js/src/server.ts:34–41  ·  view source on GitHub ↗
(validScraperNames: string[], scraperName: string | null, validNamesString: string)

Source from the content-addressed store, hash-verified

32}
33
34export function getScraperErrorMessage(validScraperNames: string[], scraperName: string | null, validNamesString: string) {
35 if (validScraperNames.length === 0) {
36 return `The scraper named '${scraperName}' does not exist. No scrapers are currently available. Please add a scraper using the Server.addScraper method.`
37 }
38 return validScraperNames.length === 1
39 ? `A scraper with the name '${scraperName}' does not exist. The scraper_name must be ${validNamesString}.`
40 : `A scraper with the name '${scraperName}' does not exist. The scraper_name must be one of ${validNamesString}.`
41}
42
43
44

Callers 3

getPendingTasksFunction · 0.90
validateScraperNameFunction · 0.90
validateScraperNameParamFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected