diff --git a/pkg/indexmanagement/scripts.go b/pkg/indexmanagement/scripts.go index 562cd4e32..9d894ab94 100644 --- a/pkg/indexmanagement/scripts.go +++ b/pkg/indexmanagement/scripts.go @@ -25,6 +25,11 @@ writeIndices=$(curl -s $ES_SERVICE/${POLICY_MAPPING}-*/_alias/${POLICY_MAPPING}- -H"Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ -HContent-Type:application/json) +if echo "$writeIndices" | grep "\"error\"" ; then + echo "Error while attemping to determine the active write alias: $writeIndices" + exit 1 +fi + CMD=$(cat <