Handle invalid slugs

For invalid slugs (eg `/info/""<--`) caused by malicious attempts or
a user mistyping the URL, the app now returns 404 instead of 500.