The code (and the platform it runs on) that, if it stops working, means that your product stops working, and your business has a problem.
-
Development is change.
-
Change means things can break.
-
Production breakage can be really, really bad.
Good production software is the result of a fear-free software development culture and process.
try:
result = requests.get(url, raise_for_status=True)
except HTTPError as e:
logging.error("request failed with status %s", e.status)
raise
It should not make a difference it you execute an operation once or more. Test it.
You should always be able to tell the exact state of your entire application, right now.
-
Think about the future, but don’t try to predict it.
-
Strife to make the present code and application state easy to reason about.
-
Make sure changes (and failures) happen at deployment time.
-
get your team on board
-
Get your product owner on board
-
Integrate it into your agile process
-
Integrate it in your definition of done