Alerting: Fix "Not Implemented" responses (#57710)
* fix swagger spec, return 404 instead of 501 when an endpoint does not exist * update number of paths in authorization_test.go
This commit is contained in:
@@ -27,8 +27,6 @@ import (
|
||||
|
||||
var searchRegex = regexp.MustCompile(`\{(\w+)\}`)
|
||||
|
||||
var NotImplementedResp = ErrResp(http.StatusNotImplemented, errors.New("endpoint not implemented"), "")
|
||||
|
||||
func toMacaronPath(path string) string {
|
||||
return string(searchRegex.ReplaceAllFunc([]byte(path), func(s []byte) []byte {
|
||||
m := string(s[1 : len(s)-1])
|
||||
|
||||
Reference in New Issue
Block a user