NCIOCPL / clinical-trials-search-app

Clinical Trial Search Front-end
1 stars 6 forks source link

Incorrect prerender-status-code on API error. #625

Closed blairlearn closed 1 week ago

blairlearn commented 4 months ago

Issue description

When an API error occurs, the prerender-status-code meta tag is rendered with a value of 404. This will cause the prerender to cache the page as not existing.

ESTIMATE TBD

Steps to reproduce the issue

  1. Edit your hosts file to alias clinicaltrialsapi.cancer.gov to 0.0.0.0
  2. Go a valid trial details page (e.g. https://www.cancer.gov/research/participate/clinical-trials-search/v?id=NCI-2018-03695)
  3. Open the browser's developer tools to the Elements/DOM view
  4. Search for the meta tag with name="prerender-status-code"

What's the expected result?

What's the actual result?

Additional details / screenshot

Related Tickets