fix(http): return correct response code when dashboard creation fails (#13803)

pull/13811/head
Jade McGough 2019-05-06 16:19:42 -07:00 committed by GitHub
parent 56fcf761f3
commit 291ac06372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -431,11 +431,7 @@ func (h *DashboardHandler) handlePostDashboard(w http.ResponseWriter, r *http.Re
return
}
if err := h.DashboardService.CreateDashboard(ctx, req.Dashboard); err != nil {
EncodeError(ctx, &platform.Error{
Code: platform.EInternal,
Msg: "Error loading dashboards",
Err: err,
}, w)
EncodeError(ctx, err, w)
return
}