From d2d309012477c8d0c756afaefaf1922229ba92ec Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Mon, 15 Jul 2024 20:43:52 -0700 Subject: [PATCH] response isn't necessarily json --- action.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.py b/action.py index bcf4f9a..d016045 100644 --- a/action.py +++ b/action.py @@ -120,7 +120,10 @@ def send_payload_to_api( print("#### Payload ####") pprint.pprint(payload) print("#### Response ####") - pprint.pprint(response.json()) + try: + pprint.pprint(response.json()) + except: + print(response.text) # Write response to application.log log_file_path = "./application.log"