Browse Source

handle new error message

bergquist 8 years ago
parent
commit
130a2b6499
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pkg/api/dashboard.go

+ 3 - 0
pkg/api/dashboard.go

@@ -249,6 +249,9 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
 		if err == m.ErrDashboardWithSameUIDExists {
 		if err == m.ErrDashboardWithSameUIDExists {
 			return Json(412, util.DynMap{"status": "name-exists", "message": err.Error()})
 			return Json(412, util.DynMap{"status": "name-exists", "message": err.Error()})
 		}
 		}
+		if err == m.ErrDashboardWithSameNameInFolderExists {
+			return Json(412, util.DynMap{"status": "name-exists", "message": err.Error()})
+		}
 		if err == m.ErrDashboardVersionMismatch {
 		if err == m.ErrDashboardVersionMismatch {
 			return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
 			return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
 		}
 		}