captbaritone / urlmeme

A meme generator where the URL is the user interface
http://urlme.me
MIT License
123 stars 18 forks source link

Serve an image on error #28

Open captbaritone opened 5 years ago

captbaritone commented 5 years ago

I broke images yesterday (deleted the cache directory in addition to its contents when I tried to free up some disk space on the server). They were returning 500 which was probably confusing for any place that they are embedded.

We should catch errors thrown in the image generation path and return a special 500 image if it fails.

captbaritone commented 5 years ago

We are actually already doing this when imgur images fail to get created. We should expand it to all error responses ending in png/jpg/jpeg/gif. Ideally by serving a static image rather than generating one.