torchbox / careers

Torchbox careers site
https://torchbox.com/careers
4 stars 1 forks source link

#116 - Add Error Catching for Draft Richtext Embeds #93

Closed jhancock532 closed 1 year ago

jhancock532 commented 2 years ago

Link to Ticket On Codebase

Description of Changes Made

To prevent draft or unpublished image embeds from breaking the site during the build process, I've added basic error catching that returns a message saying the content has not yet been published.

How to Test

Link to changes made on preview site

Ideally, the best way to test this is to spin up a separate staging content model on contentful and update the API requests in this branch to reference the staging URL. This way we could break the content model without affecting the main site - unfortunately the effort required for this is likely not worthwhile. It might be more worthwhile to merge first and then test afterwards, as I'm fairly confident this will resolve the issue.

MR Checklist