Support connectors that return logs (#230)
This commit is contained in:
parent
393fac80a7
commit
87c34f4822
|
@ -91,6 +91,13 @@ class ServiceTaskDelegate:
|
|||
json_parse_error = e
|
||||
parsed_response = {}
|
||||
|
||||
if "spiff__logs" in parsed_response:
|
||||
for log in parsed_response["spiff__logs"]:
|
||||
current_app.logger.info(f"Log from connector {name}: {log}")
|
||||
if "api_response" in parsed_response:
|
||||
parsed_response = parsed_response["api_response"]
|
||||
response_text = json.dumps(parsed_response)
|
||||
|
||||
if proxied_response.status_code >= 300:
|
||||
message = ServiceTaskDelegate.get_message_for_status(proxied_response.status_code)
|
||||
error = f"Received an unexpected response from service {name} : {message}"
|
||||
|
|
|
@ -4,7 +4,6 @@ from tests.spiffworkflow_backend.helpers.base_test import BaseTest
|
|||
|
||||
|
||||
class TestDebugController(BaseTest):
|
||||
|
||||
def test_test_raise_error(
|
||||
self,
|
||||
app: Flask,
|
||||
|
|
Loading…
Reference in New Issue