refactor: replace catch (error: any) with unknown and add type narrowing - #4212
Conversation
|
Warning: Large Pull Request Detected |
|
|
Hello @dipexplorer Just wanted to provide some context on the failing checks, specifically the SonarCloud Quality Gate warning regarding code duplication. Since this PR resolves the widespread codebase refactoring of Regarding the other CI and E2E test failures, they might be related to flaky tests on the Could you please review and merge the PR whenever possible? Thank you! |
623f66e


🛑 STOP: Assignment & File Scope Check
Warning
PRs with unrelated files will not be reviewed and may be closed.
📋 PR Summary & Link
catch (error: any)#4188 **catch (error: any)(including variants likeerr: anyanddbError: any) withcatch (error: unknown). Proper error type narrowing was added across all modified files usinginstanceof Errorand runtime object checks to safely access properties likeerror.messageanderror.statusin strict mode.📸 Proof of Work (Screenshots / Logs)
Important
No Pull Request will be merged without proof of testing!
Please drag & drop your screenshots/GIFs here:
This is a pure TypeScript refactoring without UI changes
🏷️ PR Type
type: bugtype: featuretype: docstype: testingtype: securitytype: performancetype: designtype: refactortype: devopstype: accessibility✅ Checklist
Closes #4188)mainand resolved any conflicts