diff -r 71643a839c80 roundup/cgi/actions.py --- a/roundup/cgi/actions.py Thu Jul 14 22:03:48 2016 -0400 +++ b/roundup/cgi/actions.py Sat Jul 16 23:14:11 2016 -0400 @@ -1152,11 +1152,11 @@ props = klass.getprops() for cname in columns: if cname not in props: - # TODO raise exceptions.NotFound(.....) does not give message - # so using SeriousError instead - self.client.response_code = 404 - raise exceptions.SeriousError( - self._('Column "%(column)s" not found on %(class)s') + # use error code 400: Bad Request. Do not use + # error code 404: Not Found. + self.client.response_code = 400 + raise exceptions.NotFound( + self._('Column "%(column)s" not found in %(class)s') % {'column': cgi.escape(cname), 'class': request.classname}) # full-text search diff -r 71643a839c80 roundup/cgi/client.py --- a/roundup/cgi/client.py Thu Jul 14 22:03:48 2016 -0400 +++ b/roundup/cgi/client.py Sat Jul 16 23:14:11 2016 -0400 @@ -519,7 +519,7 @@ pass except SeriousError, message: - self.write_html(str(message)) + self.write_html(str(message)) except Redirect, url: # let's redirect - if the url isn't None, then we need to do # the headers, otherwise the headers have been set before the @@ -550,16 +550,32 @@ self.response_code = 304 self.header() except NotFound, e: - self.response_code = 404 - self.template = '404' - try: - cl = self.db.getclass(self.classname) - self.write_html(self.renderContext()) - except KeyError: - # we can't map the URL to a class we know about - # reraise the NotFound and let roundup_server - # handle it - raise NotFound(e) + if self.response_code == 400: + # We can't find a parameter (e.g. property name + # incorrect). Tell the user what was raised. + # Do not change to the 404 template since the + # base url is valid just query args are not. + # copy the page format from SeriousError _str_ exception. + error_page = """ + Roundup issue tracker: An error has occurred + + + +

%s

+ + """ + self.write_html(error_page%str(e)) + else: + self.response_code = 404 + self.template = '404' + try: + cl = self.db.getclass(self.classname) + self.write_html(self.renderContext()) + except KeyError: + # we can't map the URL to a class we know about + # reraise the NotFound and let roundup_server + # handle it + raise NotFound(e) except FormError, e: self.add_error_message(self._('Form Error: ') + str(e)) self.write_html(self.renderContext())