Skip to content

Commit c6e9b27

Browse files
committed
only show once
1 parent 5b012f7 commit c6e9b27

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/azure-cli/azure/cli/command_modules/role/_msgrpah/_graph_client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ def _send(self, method, url, param=None, body=None, api_version=V1_0):
6060
err = ex.response.json()['error']
6161
code = err['code']
6262
message = err['message']
63-
graph_error_message = (
64-
f"({code}) {message}\n"
65-
f"Code: {code}\n"
66-
f"Message: {message}"
67-
)
68-
raise GraphError(graph_error_message, ex.response) from ex
63+
raise GraphError(f"({code}) {message}", ex.response) from ex
6964
# Other exceptions like AuthenticationError should not be handled here, so we don't catch CLIError
7065

7166
if r.text:

0 commit comments

Comments
 (0)