mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 11:42:20 +08:00
Grafana: Replace magic number with a constant variable in response status (#80132)
* Chore: Replace response status with const var * Apply suggestions from code review Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> * Add net/http import --------- Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/response"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
@ -8,7 +10,7 @@ import (
|
||||
|
||||
var (
|
||||
ServerError = func(err error) response.Response {
|
||||
return response.Error(500, "Server error", err)
|
||||
return response.Error(http.StatusInternalServerError, "Server error", err)
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user