Browse Source

[917] add a new logging id for the incorrect specified data, and print
it when responding the 404 status code due to the data error

Naoki Kambe 13 years ago
parent
commit
ebe4e57805
2 changed files with 7 additions and 1 deletions
  1. 1 1
      src/bin/stats/stats_httpd.py.in
  2. 6 0
      src/bin/stats/stats_httpd_messages.mes

+ 1 - 1
src/bin/stats/stats_httpd.py.in

@@ -129,7 +129,7 @@ class HttpHandler(http.server.BaseHTTPRequestHandler):
             # Couldn't find neither specified module name nor
             # specified item name
             self.send_error(404)
-            logger.error(STATHTTPD_SERVER_ERROR, err)
+            logger.error(STATHTTPD_SERVER_DATAERROR, err)
             return None
         except StatsHttpdError as err:
             self.send_error(500)

+ 6 - 0
src/bin/stats/stats_httpd_messages.mes

@@ -55,6 +55,12 @@ response will be sent back, and the specific error is printed. This
 is an error condition that likely points to a module that is not
 responding correctly to statistic requests.
 
+% STATHTTPD_SERVER_DATAERROR HTTP server data error: %1
+An internal error occurred while handling an HTTP request. An HTTP 404
+response will be sent back, and the specific error is printed. This
+is an error condition that likely points the specified data
+corresponding to the requested URI is incorrect.
+
 % STATHTTPD_SERVER_INIT_ERROR HTTP server initialization error: %1
 There was a problem initializing the HTTP server in the stats-httpd
 module upon receiving its configuration data. The most likely cause