Skip to content

[azure] Friendlier errors from log forwarding upsert#38

Merged
agulen merged 10 commits into
mainfrom
altan/2510/friendlyerror
Oct 17, 2025
Merged

[azure] Friendlier errors from log forwarding upsert#38
agulen merged 10 commits into
mainfrom
altan/2510/friendlyerror

Conversation

@agulen
Copy link
Copy Markdown
Member

@agulen agulen commented Oct 17, 2025

Overview

Jira

Display friendlier messages when errors occur during log forwarding existence check or upsert.

@agulen agulen requested a review from a team as a code owner October 17, 2025 01:33
@agulen agulen requested review from benjjs, dor-weid and gpalmz and removed request for dor-weid October 17, 2025 01:33
"python.analysis.autoSearchPaths": true,
"python.terminal.activateEnvironment": true
"python.terminal.activateEnvironment": true,
"python.languageServer": "Pylance"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're doing format-on-save now I want to mess with the settings a bit (max length 80 hurts my eyes) but I can do that in a followup.

Copy link
Copy Markdown
Collaborator

@gpalmz gpalmz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nitty things but non-blocking

return set(
[s for s in scopes if isinstance(s, Subscription)] +
[s for subs in [m.subscriptions.subscriptions for m in scopes if isinstance(m, ManagementGroup)] for s in subs]
[s for s in scopes if isinstance(s, Subscription)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the max line length with this formatter? Like 10 chars? 🤣

except Exception as e:
raise AccessError("Azure CLI not authenticated. Run 'az login' first.") from e
raise AzCliNotAuthenticatedError(
"Azure CLI is not authenticated. Please run 'az login' first and retry"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this user the same error message as in setup.py? Also curious whether this error should be raised there

@agulen agulen merged commit 7bcfec2 into main Oct 17, 2025
1 check passed
@agulen agulen deleted the altan/2510/friendlyerror branch October 17, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants