Jeremy Newman : fail to error page on bad query, use debug log and error handler