DIYgod/RSSHub · warning · Error

No Calls for Papers found

Error message

No Calls for Papers found

What it means

Thrown when the parsed ScienceDirect payload parses successfully but contains no callsForPapers.list entries (the array is empty or the path is absent). It distinguishes a structural failure (no script / bad JSON) from a legitimately-empty result for the requested subject.

Source

Thrown at lib/routes/sciencedirect/call-for-paper.tsx:46

    const apiUrl = `https://www.sciencedirect.com/browse/calls-for-papers?subject=${subject}`;
    const response = await got(apiUrl);
    const $ = load(response.body);

    const scriptJSON = $('script[data-iso-key="_0"]').text();
    if (!scriptJSON) {
        throw new Error('Cannot find the script with data-iso-key="_0"');
    }

    let data;
    try {
        data = JSON.parse(JSON.parse(scriptJSON));
    } catch (error: any) {
        throw new Error(`Failed to parse embedded script JSON: ${error.message}`, { cause: error });
    }

    const cfpList = data?.callsForPapers?.list || [];
    if (!cfpList.length) {
        throw new Error('No Calls for Papers found');
    }

    const items = cfpList.map((cfp) => {
        const link = `https://www.sciencedirect.com/special-issue/${cfp.contentId}/${cfp.url}`;
        const description = renderToString(
            <div>
                <p>
                    <strong>Summary:</strong> {cfp.summary}
                </p>
                <p>
                    <strong>Submission Deadline:</strong> {cfp.submissionDeadline}
                </p>
                <p>
                    <strong>Journal:</strong> {`${cfp.journal.displayName} (IF: ${cfp.journal.impactFactor}, CiteScore: ${cfp.journal.citeScore})`}
                </p>
            </div>
        );

View on GitHub (pinned to bed535e087)

Solutions

  1. Open the URL in a browser and confirm whether calls for that subject actually exist today.
  2. If calls exist but the path changed, update data.callsForPapers.list to the new location in the parsed payload.
  3. Try a known-busy subject (e.g. 'education') to verify the path is correct.
  4. If empty is a valid state, consider returning an allowEmpty feed instead of throwing.

Example fix

// before
const cfpList = data?.callsForPapers?.list || [];
if (!cfpList.length) {
    throw new Error('No Calls for Papers found');
}

// after — return an empty feed (with allowEmpty) instead of erroring when the subject genuinely has none
const cfpList = data?.callsForPapers?.list || [];
if (!cfpList.length) {
    return { title: `ScienceDirect Calls for Papers - ${subject}`, description: 'No open calls for papers.', link: apiUrl, item: [], allowEmpty: true };
}
Defensive patterns

Strategy: fallback

Validate before calling

// Treat an empty callsForPapers list as an empty feed, not an error, when the subject is valid.
const cfpList = data?.callsForPapers?.list ?? [];
if (!cfpList.length) {
    return { title: `...`, item: [], allowEmpty: true } as Data;
}

Type guard

const hasCfpList = (d: unknown): d is { callsForPapers: { list: unknown[] } } =>
    isPlainObject(d) && Array.isArray((d as any)?.callsForPapers?.list) && (d as any).callsForPapers.list.length > 0;

Try / catch

try {
    return await handler(ctx);
} catch (e) {
    if (e instanceof Error && /No Calls for Papers found/.test(e.message)) {
        // return an empty-but-valid feed instead of a hard failure
        return { title: `ScienceDirect Calls for Papers - ${subject}`, item: [], allowEmpty: true };
    }
    throw e;
}

Prevention

When it happens

Trigger: data.callsForPapers.list is undefined/null/[] after successful parsing. This happens when the subject has no open calls for papers, or when ScienceDirect moved the list to a different JSON path.

Common situations: A subject slug with no current special issues; the JSON key was renamed (e.g. callsForPapers -> cfps) so the optional chaining yields nothing; all calls for that subject expired and were pruned.

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/022f55649c91f786. Report an issue: GitHub.