I have script that used curl 
when i pass wrong parameters to script curl failed but script continue executing.
I have tried use curl -f/--fail parameter but problem does not solved.
What is the best way to stop script?

I have founded my mistake.
I used curl command into another command 

echo `curl --fail ... || exit 1`


After removing echo command curl become working properly.
Thank you for answer, it is also useful.


Question: iTunes reject app for date of birth
Answer: This isn't really something that anyone other than Apple could help you with.

Here is a link to the guidelines for your app to be published. https://developer.apple.com/app-store/review/guidelines/

And here is a link to their support page. https://developer.apple.com/contact/

Best of luck.