Fix curl command to exit on non 200 response