Commit fe40730b authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Print response status code.

parent 1a7cb13f
Pipeline #37960 passed with stages
in 1 minute and 10 seconds
......@@ -224,7 +224,8 @@ class WriteJobResultToDrupal(MethodView):
app.logger.error(message)
raise ImportApiError(message)
else:
message = "Unknown response status code for drupal api for url " + url
message = f"Unknown response status code {response.status_code} " \
f"({response.reason}) for drupal api for url " + url
app.logger.error(message)
raise ImportApiError(message)
return result
......@@ -89,9 +89,9 @@ class WriteTypeReportToDrupal(MethodView):
f"Could not write report to {node_type}/{identifier}: {e.message}"
)
return {
"error": f"Could not write report to {node_type}/{identifier}: "
f"{e.message}"
}, 500
"error": f"Could not write report to {node_type}/{identifier}: "
f"{e.message}"
}, 500
def get_drupal_uuid(self, memobase_id: str, node_type: str):
url = f"{self.base_url}/jsonapi/node/{node_type}?filter[field_memobase_id]={memobase_id}"
......@@ -173,7 +173,8 @@ class WriteTypeReportToDrupal(MethodView):
app.logger.error(message)
raise ImportApiError(message)
else:
message = "Unknown response status code for drupal api for url " + url
message = f"Unknown response status code {response.status_code} " \
f"({response.reason}) for drupal api for url " + url
app.logger.error(message)
raise ImportApiError(message)
return result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment