Skip to content

feat: enhance type safety and error handling in extension#905

Open
dgolovin wants to merge 3 commits into
redhat-developer:mainfrom
dgolovin:i194
Open

feat: enhance type safety and error handling in extension#905
dgolovin wants to merge 3 commits into
redhat-developer:mainfrom
dgolovin:i194

Conversation

@dgolovin

@dgolovin dgolovin commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Fix #194.

  • Updated package.json to include a typecheck script.
  • Updated build script to include typecheck strp.
  • Improved type definitions in extension.spec.ts and extension.ts for better type safety.
  • Added error handling for missing context, cluster, and user in OpenShift functions.
  • Refactored functions to ensure undefined checks and proper error messages.
  • Enhanced the getSandboxAPIUrl function to return undefined when no URL is configured.

dgolovin added 2 commits July 1, 2026 21:08
Fix redhat-developer#194.

- Updated package.json to include a typecheck script.
- Updated build script to include typecheck strp.
- Improved type definitions in extension.spec.ts and extension.ts for better type safety.
- Added error handling for missing context, cluster, and user in OpenShift functions.
- Refactored functions to ensure undefined checks and proper error messages.
- Enhanced the getSandboxAPIUrl function to return undefined when no URL is configured.

Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Assisted-by: <Cursor>
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Assisted-by: <Cursor>
Signed-off-by: Denis Golovin <dgolovin@redhat.com>

@jeffmaury jeffmaury left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typecheck is performed not automatically in other places ?

@dgolovin

dgolovin commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

I added to build only, similar to SSO Extension to have it executed in CI without modifying GHA workflows.

@dgolovin dgolovin requested a review from jeffmaury July 2, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add typecheck step to pr-check workflow to catch the same errors reported in vscode

2 participants