feat: Skip pages with status codes 4xx from the scraper#2068
Merged
Conversation
|
This PR will trigger no release when merged. |
noruiz
reviewed
Mar 3, 2026
src/metatags/handler.js
Outdated
| } | ||
|
|
||
| // Skip 4xx pages when statusCode is present (new scrapes); old scrapes have no statusCode | ||
| if (object.statusCode !== undefined && object.statusCode !== null) { |
Contributor
There was a problem hiding this comment.
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
noruiz
approved these changes
Mar 3, 2026
Contributor
noruiz
left a comment
There was a problem hiding this comment.
Small comment to simplify condition, otherwise looks good
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))
Member
|
🎉 This PR is included in version 1.339.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure your pull request adheres to the following guidelines:
Related Issues
https://jira.corp.adobe.com/browse/SITES-40741
Thanks for contributing!