commit eaed73e0c2f4ba73726157cd739b4aa5bce0e4e0 Author: iwakeh iwakeh@torproject.org Date: Mon Dec 11 13:58:04 2017 +0000
Trying to tweak error message a little. --- .../java/org/torproject/metrics/exonerator/ExoneraTorServlet.java | 7 +++---- src/main/resources/ExoneraTor.properties | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java index 8464f50..b092355 100644 --- a/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java +++ b/src/main/java/org/torproject/metrics/exonerator/ExoneraTorServlet.java @@ -175,7 +175,7 @@ public class ExoneraTorServlet extends HttpServlet { /* If the timestamp is too recent, print summary with error message and * exit. */ } else if (requestedDate.tooRecent) { - this.writeSummaryTimestampTooRecent(out, rb, requestedDate.asString); + this.writeSummaryTimestampTooRecent(out, rb); this.writeFooter(out, rb, null, null);
/* If we were unable to connect to the database, @@ -442,11 +442,10 @@ public class ExoneraTorServlet extends HttpServlet { }
private void writeSummaryTimestampTooRecent(PrintWriter out, - ResourceBundle rb, String timestampStr) throws IOException { + ResourceBundle rb) throws IOException { this.writeSummary(out, rb.getString("summary.heading"), "panel-danger", rb.getString("summary.invalidparams.timestamptoorecent.title"), - null, rb.getString("summary.invalidparams.timestamptoorecent.body"), - timestampStr); + null, rb.getString("summary.invalidparams.timestamptoorecent.body")); }
private void writeSummaryNoDataForThisInterval(PrintWriter out, diff --git a/src/main/resources/ExoneraTor.properties b/src/main/resources/ExoneraTor.properties index 2d71486..936754a 100644 --- a/src/main/resources/ExoneraTor.properties +++ b/src/main/resources/ExoneraTor.properties @@ -20,7 +20,7 @@ summary.invalidparams.invalidip.body=Sorry, %s is not a valid IP address. The ex summary.invalidparams.invalidtimestamp.title=Invalid date parameter summary.invalidparams.invalidtimestamp.body=Sorry, %s is not a valid date. The expected date format is %s. summary.invalidparams.timestamptoorecent.title=Date parameter too recent -summary.invalidparams.timestamptoorecent.body=Sorry, %s is too recent. The database may not yet contain enough data to correctly answer this request. +summary.invalidparams.timestamptoorecent.body=The database may not yet contain enough data to correctly answer this request. The latest accepted data is the day before yesterday. Please repeat your search on another day. summary.serverproblem.nodata.title=Server problem summary.serverproblem.nodata.body.text=The database does not contain any data for the requested date. Please try again later. If this problem persists, please %s! summary.serverproblem.nodata.body.link=let us know
tor-commits@lists.torproject.org