Skip to content

Commit 7640f8b

Browse files
Merge pull request #50 from step-security/Raj-StepSecurity-patch-5
feat: Validate Updated Subscription Flow
2 parents 1142226 + ba0e6bd commit 7640f8b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

entrypoint.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ RESPONSE=$(curl --max-time 3 -s -w "%{http_code}" "$API_URL" -o /dev/null) || tr
1818
CURL_EXIT_CODE=${?}
1919

2020
# Check if the response code is not 200
21-
if [ $CURL_EXIT_CODE -ne 0 ] || [ "$RESPONSE" != "200" ]; then
22-
if [ -z "$RESPONSE" ] || [ "$RESPONSE" == "000" ] || [ $CURL_EXIT_CODE -ne 0 ]; then
23-
echo "Timeout or API not reachable. Continuing to next step."
24-
else
25-
echo "Subscription is not valid. Reach out to support@stepsecurity.io"
26-
exit 1
27-
fi
21+
if [ $CURL_EXIT_CODE -ne 0 ]; then
22+
echo "Timeout or API not reachable. Continuing to next step."
23+
elif [ "$RESPONSE" = "200" ]; then
24+
:
25+
elif [ "$RESPONSE" = "403" ]; then
26+
echo "Subscription is not valid. Reach out to support@stepsecurity.io"
27+
exit 1
28+
else
29+
echo "Timeout or API not reachable. Continuing to next step."
2830
fi
2931

3032
MILESTONE_ID_TO_USE=${MILESTONE_NUMBER:-$PROVIDED_MILESTONE_ID}

0 commit comments

Comments
 (0)