try {
Dashboard dashboard = dashboardService.get(dashboardId);
DashboardWidget widget = dashboard.getWidget(widgetId);
widget.updateDescription(api(), newDescription.trim());
return ok().as(Http.MimeTypes.JSON);
} catch (APIException e) {
String message = "Could not get widget. We expected HTTP 200, but got a HTTP " + e.getHttpCode() + ".";
return status(504, views.html.errors.error.render(message, e, request()));