Chore: Handle wrapped errors (#29223)

* Chore: Handle wrapped errors

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
Arve Knudsen
2020-11-19 13:34:28 +01:00
committed by GitHub
co-authored by Emil Tullstedt
parent 0cb29d337a
commit 294770f411
34 changed files with 153 additions and 124 deletions
+1 -1
View File
@@ -498,7 +498,7 @@ func CalculateDashboardDiff(c *models.ReqContext, apiOptions dtos.CalculateDiffO
result, err := dashdiffs.CalculateDiff(&options)
if err != nil {
if err == models.ErrDashboardVersionNotFound {
if errors.Is(err, models.ErrDashboardVersionNotFound) {
return Error(404, "Dashboard version not found", err)
}
return Error(500, "Unable to compute diff", err)