Skip to content

Commit

Permalink
refactor: change status code returned by /api/trigger/check for pro…
Browse files Browse the repository at this point in the history
…metheus errors (except bad data error type)
  • Loading branch information
AleksandrMatsko committed Sep 10, 2024
1 parent 681a1eb commit e5a223c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/handler/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func triggerCheck(writer http.ResponseWriter, request *http.Request) {
render.Render(writer, request, api.ErrorInvalidRequest(fmt.Errorf("invalid prometheus targets: %w", err))) //nolint
return
default:
render.Render(writer, request, api.ErrorInvalidRequest(err)) //nolint
render.Render(writer, request, api.ErrorInternalServer(err)) //nolint
return
}
default:
Expand Down

0 comments on commit e5a223c

Please sign in to comment.