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:
co-authored by
Emil Tullstedt
parent
0cb29d337a
commit
294770f411
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user