Skip to content

Commit 8626f57

Browse files
committed
Fixes #1370
1 parent f8b2d0e commit 8626f57

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sonar/projects.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,9 +998,13 @@ def export(self, export_settings: types.ConfigSettings, settings_list: dict[str,
998998
except HTTPError as e:
999999
if e.response.status_code == HTTPStatus.FORBIDDEN:
10001000
log.critical("Insufficient privileges to access %s, export of this project skipped", str(self))
1001+
json_data = {"error": "Insufficient permissions while extracting project"}
10011002
else:
10021003
log.critical("HTTP error %s while exporting %s, export of this project skipped", str(e), str(self))
1003-
json_data = {}
1004+
json_data = {"error": f"HTTP error {str(e)} while extracting project"}
1005+
except ConnectionError as e:
1006+
log.critical("Connecting error %s while extracting %s, extract of this project skipped", str(self), str(e))
1007+
json_data = {"error": f"Connection error {str(e)} while extracting prooject"}
10041008
log.info("Exporting %s done", str(self))
10051009
return util.remove_nones(json_data)
10061010

0 commit comments

Comments
 (0)