Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: dashboard/dashboard/create_health_report.py

Issue 2648683004: Building the table for speed releasing. (Closed)
Patch Set: Added more logging Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dashboard/dashboard/create_health_report.py
diff --git a/dashboard/dashboard/create_health_report.py b/dashboard/dashboard/create_health_report.py
index 4a1b175b61aef7650c671a88c7126be3519d5cdf..0186cb3c1ce780d66e8fecc5fbd7e586867940c5 100644
--- a/dashboard/dashboard/create_health_report.py
+++ b/dashboard/dashboard/create_health_report.py
@@ -4,6 +4,7 @@
"""Provides the web interface for adding and editing sheriff rotations."""
+import logging
import json
from google.appengine.api import users
@@ -58,9 +59,17 @@ class CreateHealthReportHandler(request_handler.RequestHandler):
}))
return
- created_table, msg = table_config.CreateTableConfig(
- name=name, bots=master_bot, tests=tests, layout=table_layout,
- username=user.email())
+ try:
+ created_table = table_config.CreateTableConfig(
+ name=name, bots=master_bot, tests=tests, layout=table_layout,
+ username=user.email())
+ except table_config.BadRequestError as error:
+ self.response.out.write(json.dumps({
+ 'error': error.message,
+ }))
+ logging.error(error.message)
+ return
+
if created_table:
self.response.out.write(json.dumps({
@@ -68,8 +77,9 @@ class CreateHealthReportHandler(request_handler.RequestHandler):
}))
else:
self.response.out.write(json.dumps({
- 'error': msg,
+ 'error': 'Could not create table.',
}))
+ logging.error('Could not create table.')
def _ValidateToken(self):
user = users.get_current_user()
« no previous file with comments | « no previous file | dashboard/dashboard/create_health_report_test.py » ('j') | dashboard/dashboard/speed_releasing.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698