Skip to content

composeAuditURL does not return the correct URL in some cases of domains with bot protection  #237

@iuliag

Description

@iuliag

Description
composeAuditURL is used in both audit and import workers to return the URL to audit/import data for.
composeAuditURL does not return the correct URL in some cases of domains with bot protection, see example in slack thread below.

An empty response from RUM/ahrefs APIs doesn't always mean we're querying for the wrong URL. e.g. broken backlinks is expected sometimes to return empty, sometimes with broken backlinks. So we cannot just assume empty response => fallback to www, like the fix implemented in adobe/spacecat-audit-worker#248.

Expected behavior
composeAuditURL or a similar shared function should return a correct URL for those cases as well, and audits/imports should be updated to that version.

Additional context
See https://cq-dev.slack.com/archives/C05A45JBP9N/p1715068794711109

composeAuditURL:

async function composeAuditURL(url) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions