Alerting: Update forking request handlers to use the same errors (#52965)
* generalize error handling in forking request handlers * remove MatchesBackend and change test to test Can * add 404 to route specs * change backendTypeByUID to getDatasourceByUID of expected type * use common errors in api testing * handle 401 in errorToResponse * replace backend type error with "unexpected datasource type" * update swagger spec
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
//
|
||||
// Responses:
|
||||
// 200: RuleResponse
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/prometheus/grafana/api/v1/alerts prometheus RouteGetGrafanaAlertStatuses
|
||||
//
|
||||
@@ -33,6 +34,7 @@ import (
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertResponse
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:model
|
||||
type RuleResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user