Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check banner object for field before trying to iterate over it. #840

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

timcosgrove
Copy link
Contributor

Description

Banner data did not contain a field we were expecting and the banner code attempted to iterate over it.

This threw an error which caused the entire page to not be built, which is a problem for us.

Ticket

QA steps

Visit /boston-health-care/events on this Tugboat instance; it should show a page.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat December 12, 2024 22:21 Destroyed
Copy link

@eselkin eselkin left a comment

Choose a reason for hiding this comment

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

LGTM
At some future point it might be good to restructure this be a little simpler

(banner.field_banner_alert_vamcs || []).map...

But it works

@7hunderbird
Copy link

Looks good to me +1

Went to https://pr840-xxegfpomzm0ryj6qekdo8eodojtrjvbo.tugboat.vfs.va.gov/boston-health-care/events/ and it's loading with the banner.

CleanShot 2024-12-12 at 15 50 19

@timcosgrove timcosgrove merged commit 4bf77e6 into main Dec 12, 2024
9 of 10 checks passed
@timcosgrove timcosgrove deleted the tfc-check_for_field_before_map branch December 12, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants