handle new error message

This commit is contained in:
bergquist 2018-02-02 11:06:32 +01:00
parent 0c98c4db30
commit 130a2b6499

View File

@ -249,6 +249,9 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
if err == m.ErrDashboardWithSameUIDExists {
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 {
return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
}