Skip to content

Commit de52994

Browse files
committed
Detect unsupported operation from unknown URL
1 parent 29e0fc7 commit de52994

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sonar/platform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ def __run_request(self, request: callable, api: str, params: types.ApiParams = N
304304
raise exceptions.UnsupportedOperation(err_msg) from e
305305
if any(msg in err_msg_lower for msg in ("insufficient privileges", "insufficient permissions")):
306306
raise exceptions.SonarException(err_msg, errcodes.SONAR_API_AUTHORIZATION) from e
307+
if "unknown url" in err_msg_lower:
308+
raise exceptions.UnsupportedOperation(err_msg)
307309
raise exceptions.SonarException(err_msg, errcodes.SONAR_API) from e
308310
except ConnectionError as e:
309311
util.handle_error(e, "")

0 commit comments

Comments
 (0)