return status(504, views.html.errors.error.render(ApiClient.ERROR_MSG_IO, e, request()));
}
}
public Result show(String id) {
final User currentUser = currentUser();
try {
Dashboard dashboard = dashboardService.get(id);
final BreadcrumbList bc = new BreadcrumbList();
bc.addCrumb("Dashboards", routes.DashboardsController.index());
bc.addCrumb(dashboard.getTitle(), routes.DashboardsController.show(dashboard.getId()));
return ok(views.html.dashboards.show.render(currentUser, bc, dashboard));
} catch (APIException e) {
if (e.getHttpCode() == NOT_FOUND || e.getHttpCode() == FORBIDDEN) {
String msg = "The requested dashboard was deleted and no longer exists.";
final Startpage startpage = currentUser.getStartpage();
if (startpage != null) {
if (new Startpage(Startpage.Type.DASHBOARD, id).equals(startpage)) {
msg += " Please reset your startpage.";
}
}