Skip to content

Harden telemetry error handling and type safety in Account SDK - #388

Open
mertcano wants to merge 1 commit into
base:masterfrom
mertcano:mertcano-patch-1
Open

Harden telemetry error handling and type safety in Account SDK#388
mertcano wants to merge 1 commit into
base:masterfrom
mertcano:mertcano-patch-1

Conversation

@mertcano

Copy link
Copy Markdown

This PR addresses error handling and type-safety anti-patterns in the Account SDK telemetry core:

  • utils.ts: Replaced generic caught types with unknown, applying strict null and object guards before property access to prevent secondary TypeError exceptions during error message extraction.
  • initCCA.ts: Normalized asynchronous thrown telemetry values into proper Error instances, ensuring proper error logging and preserving the original failure context on rejection.

This PR addresses error handling and type-safety anti-patterns in the Account SDK telemetry core:
- **`utils.ts`**: Replaced generic caught types with `unknown`, applying strict null and object guards before property access to prevent secondary `TypeError` exceptions during error message extraction.
- **`initCCA.ts`**: Normalized asynchronous thrown telemetry values into proper `Error` instances, ensuring proper error logging and preserving the original failure context on rejection.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

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.

2 participants