(validScraperNames: string[], scraperName: string | null, validNamesString: string)
| 32 | } |
| 33 | |
| 34 | export 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 |
no outgoing calls
no test coverage detected