Skip to content

feat: Skip pages with status codes 4xx from the scraper#2068

Merged
BaDos merged 3 commits intomainfrom
SITES-40741
Mar 3, 2026
Merged

feat: Skip pages with status codes 4xx from the scraper#2068
BaDos merged 3 commits intomainfrom
SITES-40741

Conversation

@BaDos
Copy link
Member

@BaDos BaDos commented Mar 3, 2026

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes
  • If data sources for any opportunity has been updated/added, please update the wiki for same opportunity.

Related Issues

https://jira.corp.adobe.com/browse/SITES-40741

Thanks for contributing!

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

This PR will trigger no release when merged.

}

// Skip 4xx pages when statusCode is present (new scrapes); old scrapes have no statusCode
if (object.statusCode !== undefined && object.statusCode !== null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if statements can be simplified to if (object.statusCode != null && object.statusCode >= 400 && object.statusCode < 500)

The != null check handles both null and undefined

Copy link
Contributor

@noruiz noruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment to simplify condition, otherwise looks good

@BaDos BaDos merged commit 78e84d4 into main Mar 3, 2026
15 checks passed
@BaDos BaDos deleted the SITES-40741 branch March 3, 2026 22:30
solaris007 pushed a commit that referenced this pull request Mar 3, 2026
# [1.339.0](v1.338.1...v1.339.0) (2026-03-03)

### Features

* Skip pages with status codes 4xx from the scraper ([#2068](#2068)) ([78e84d4](78e84d4))
@solaris007
Copy link
Member

🎉 This PR is included in version 1.339.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants