try catch
This commit is contained in:
@@ -244,10 +244,22 @@ def stripe_payments_webhook_post():
|
||||
|
||||
@api.route("/stripe/payments", methods=["GET"])
|
||||
def stripe_payments_webhook_get():
|
||||
data = request.args()
|
||||
logger.info(f"Route Stripe Webhook GET ==>>>> {data}")
|
||||
# response = MyProductsService.process_provision_actions(data)
|
||||
return []
|
||||
try:
|
||||
data = request.args()
|
||||
logger.info(f"Route Stripe Webhook GET ==>>>> {data}")
|
||||
# response = MyProductsService.process_provision_actions(data)
|
||||
return []
|
||||
except Exception as e:
|
||||
# A general exception handler for any other type of exception
|
||||
logger.error(f"An unexpected error occurred: {e}")
|
||||
else:
|
||||
# Code to execute if no exception occurs in the try block
|
||||
logger.info("Operation successful!")
|
||||
finally:
|
||||
# Code that will always execute, regardless of whether an exception occurred or not
|
||||
logger.info("This block always runs.")
|
||||
|
||||
|
||||
|
||||
# /panel/account/calendar
|
||||
@api.route("/panel/account/calendar", methods=["POST"])
|
||||
|
||||
Reference in New Issue
Block a user