wellcomecollection / alpha

Alpha version of a catalogue explorer for Wellcome Library (deprecated).
0 stars 0 forks source link

Add custom error page to Cloudfront for origin timeouts #52

Closed frankieroberto closed 8 years ago

frankieroberto commented 8 years ago

This would be better than having the default ugly white page show up.

Looks like we can upload a custom error page to S3 and set up Cloudfront to use that: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html#custom-error-pages-charges

(We's probably only want to do this for 'Gateway Timeout' errors – as other errors like 404 can be handled by the Rails app itself)

george08 commented 8 years ago

I'll work on the HTML page.

george08 commented 8 years ago

Are you able to use these? 404.html, 422.html, 500.html? https://github.com/wellcomelibrary/alpha/commit/738d911cd879a3c8e49d8702040f74b48c1e429e

frankieroberto commented 8 years ago

@george08 the 404 page can be in the app, but the 500 page has to be a standalone HTML file that we upload to the internet somewhere (e.g. Amazon S3) – as that's returned when the app crashes (so the app isn't able to even serve the error page).

george08 commented 8 years ago

Yep - there is a standalone 500.html page. Wondering if you can pop it where it needs to be, please?

https://github.com/wellcomelibrary/alpha/blob/738d911cd879a3c8e49d8702040f74b48c1e429e/public/500.html

frankieroberto commented 8 years ago

@jennpb I need your Amazon login to set this up.

frankieroberto commented 8 years ago

This is done! 👍 Hopefully you'll never see it... 😉