Skip to content

chore: standardize errors (CN-944)#786

Open
ividalATSnyk wants to merge 3 commits intomainfrom
CN-944-chore-standardize-errors
Open

chore: standardize errors (CN-944)#786
ividalATSnyk wants to merge 3 commits intomainfrom
CN-944-chore-standardize-errors

Conversation

@ividalATSnyk
Copy link
Copy Markdown
Contributor

@ividalATSnyk ividalATSnyk commented Apr 8, 2026

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

  • standardize error handling

Where should the reviewer start?

Our core change was adding lib/error-utils.ts, which exports a getErrorMessage(error: unknown): string utility. From there, we migrated all ~21 unsafe catch blocks across lib/ to use it, replacing direct .message/.stack accesses on unverified catch variables, and flipped useUnknownInCatchVariables to true in tsconfig.json so the compiler enforces this going forward.

What are the relevant tickets?

CN-944

@ividalATSnyk ividalATSnyk marked this pull request as ready for review April 8, 2026 20:44
@ividalATSnyk ividalATSnyk requested a review from a team as a code owner April 8, 2026 20:44
@snyk-pr-review-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 39 relevant code sections from 13 files (average relevance: 0.96)

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.

1 participant