Skip to content

Commit

Permalink
folders: fix api error mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
marefr committed Feb 20, 2018
1 parent b56e2a6 commit 717d8d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ func toFolderError(err error) Response {
return Json(412, util.DynMap{"status": "version-mismatch", "message": m.ErrFolderVersionMismatch.Error()})
}

if err == m.ErrDashboardNotFound {
if err == m.ErrFolderNotFound {
return Json(404, util.DynMap{"status": "not-found", "message": m.ErrFolderNotFound.Error()})
}

if err == m.ErrDashboardFailedGenerateUniqueUid {
err = m.ErrFolderFailedGenerateUniqueUid
}

return ApiError(500, "Failed to create folder", err)
return ApiError(500, "Folder API error", err)
}

0 comments on commit 717d8d0

Please sign in to comment.