You probably want to be calling validate_slug_param on `params[:subcategory]` to avoid even calling contentapi if it doesn't look like a slug (See https://github.com/alphagov/frontend/blob/master/app/controllers/browse_controller.rb#L8-L9 for example).