Chore: Aggregate save dashboard error (#26443)

* Chore: Aggregate save dashboard error
* Use errors package for error detection

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
This commit is contained in:
gastonqiu
2020-07-21 17:12:01 +08:00
committed by GitHub
parent 3c72b2f988
commit f427f90a45
7 changed files with 151 additions and 64 deletions

View File

@ -132,7 +132,7 @@ func toFolderError(err error) Response {
err == models.ErrFolderWithSameUIDExists ||
err == models.ErrDashboardTypeMismatch ||
err == models.ErrDashboardInvalidUid ||
err == models.ErrDashboardUidToLong {
err == models.ErrDashboardUidTooLong {
return Error(400, err.Error(), nil)
}