How can we raise a HTTPError exception?
How can we raise a HTTPError exception? Question: I want to raise an exception whenever i get data value as None. How can we achieve it without using custom exception? Ex: def foo(): <some code> return data @store.route("/store", methods=["GET"]) def fun(): try: data = foo() if not data: raise HTTPError() except HTTPError as he: return …