give the client a 404 for a bad 'filter' parameter
convert elsif blocks to case blocks