Returning 1 in Download_Enter not mark the update as failed

Hi all,
I’m facing an issue: In the Download_Enter state, i’m trying to check the version of the update before to proceed to the download.

This is a little sketch of the code in the Download_Enter
if ! is_installable “$AUTOMA_STATE”
“$ACTUAL_VERSION” “$ACTUAL_OS_VERSION”
“$NEW_VERSION” “$NEW_OS_VERSION”;
then
loginfo “[$AUTOMA_STATE][UPDATE INCOMPATIBLE][FAIL]”
exit 1
fi

If i return 1 (exit 1) in this state (Download_Enter), the update is not marked as failed on the server, the client continue to try to download the same artifact, and on the server i can see the progress bar of the Download_Enter state.
Is this my fail? It’s not possible to fail in this state?

Thanks for the help

Technically the update starts when the Download state is entered. Since Download_Enter is before the Download state, the update has not actually started at this point. So although it may not be completely obvious, this is the expected behavior.

I believe it is not possible to fail before the Download state with a state script, but you can fail inside the Download state with an Update Module.