-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Enhanced error handling in platfrom and API #765
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
## [2.12.0-stage.5](v2.12.0-stage.4...v2.12.0-stage.5) (2025-02-18) ### 🚀 Features * Enhanced error handling in platfrom and API ([#765](#765)) ([b4349ad](b4349ad))
🎉 This PR is included in version 2.12.0-stage.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR Type
Enhancement, Tests, Configuration changes, Documentation, Other
Description
Enhanced error handling across multiple services and components using
constructErrorBody
for consistent error messages.Refactored platform components and API services to use the new
useHttp
hook for centralized API handling, improving error handling and user feedback.Improved and simplified E2E tests for various modules, including Secret Controller, Workspace Membership, and Variable operations.
Added new utilities for authentication management, such as clearing auth cookies and logout functionality.
Updated ESLint configuration to allow non-null assertions and cleaned up unused imports for better code clarity.
Updated dependencies in
pnpm-lock.yaml
to remove redundant debug package versions.Introduced a new error boundary component for API error handling and integrated Sentry for error reporting.
Added placeholder content for the Roles Page.
Changes walkthrough 📝
5 files
secret.e2e.spec.ts
Refactor and enhance Secret Controller E2E tests
apps/api/src/secret/secret.e2e.spec.ts
workspace-membership.e2e.spec.ts
Simplify Workspace Membership E2E tests
apps/api/src/workspace-membership/workspace-membership.e2e.spec.ts
environment.e2e.spec.ts
Clean up Environment E2E test setup
apps/api/src/environment/environment.e2e.spec.ts
SecretService
andVariableService
.variable.e2e.spec.ts
Enhance Variable E2E tests
apps/api/src/variable/variable.e2e.spec.ts
feedback.e2e.spec.ts
Updated Feedback E2E Test for new error handling
apps/api/src/feedback/feedback.e2e.spec.ts
48 files
workspace-role.service.ts
Improve error handling in Workspace Role Service
apps/api/src/workspace-role/service/workspace-role.service.ts
constructErrorBody
for better errorstructure.
authority-checker.service.ts
Enhance Authority Checker Service error handling
apps/api/src/common/authority-checker.service.ts
constructErrorBody
for better errorstructure.
userId
parameter from permission checks.validation.
workspace-membership.service.ts
Improve error handling in Workspace Membership Service
apps/api/src/workspace-membership/service/workspace-membership.service.ts
constructErrorBody
for better errorstructure.
page.tsx
Refactor OTP page logic and error handling
apps/platform/src/app/auth/otp/page.tsx
useHttp
hook.index.tsx
Refactor Edit Project Sheet logic
apps/platform/src/components/dashboard/project/editProjectSheet/index.tsx
useHttp
hook.combobox.tsx
Refactor Combobox component logic
apps/platform/src/components/ui/combobox.tsx
useHttp
hook.index.tsx
Refactor Edit Variable Sheet logic
apps/platform/src/components/dashboard/variable/editVariableSheet/index.tsx
useHttp
hook.variable.service.ts
Enhance error handling in Variable Service
apps/api/src/variable/service/variable.service.ts
constructErrorBody
for better errorstructure.
index.tsx
Refactored Add Environment Dialogue for better API handling
apps/platform/src/components/dashboard/environment/addEnvironmentDialogue/index.tsx
useHttp
hook for API calls.isLoading
.index.tsx
Enhanced Edit Environment Sheet with better API handling
apps/platform/src/components/dashboard/environment/editEnvironmentSheet/index.tsx
useHttp
hook for API calls.isLoading
state for managing loading indicators.index.tsx
Refactored Edit Secret Sheet for improved API handling
apps/platform/src/components/dashboard/secret/editSecretSheet/index.tsx
useHttp
for API calls.isLoading
state for better user feedback.page.tsx
Enhanced Profile Page with delete functionality and better API
handling
apps/platform/src/app/(main)/(settings)/settings/@profile/page.tsx
useHttp
for API calls.useEffect
to fetch user profile data.index.tsx
Refactored Add Variable Dialogue for better API handling
apps/platform/src/components/dashboard/variable/addVariableDialogue/index.tsx
useHttp
for API calls.isLoading
state for better user feedback.index.tsx
Enhanced Add Secret Dialogue with improved API handling
apps/platform/src/components/dashboard/secret/addSecretDialogue/index.tsx
useHttp
for API calls.isLoading
state for better user feedback.index.tsx
Enhanced Confirm Delete Environment with better API handling
apps/platform/src/components/dashboard/environment/confirmDeleteEnvironment/index.tsx
useHttp
for API calls.isLoading
state for managing loading indicators.index.tsx
Improved Confirm Delete Secret with better API handling
apps/platform/src/components/dashboard/secret/confirmDeleteSecret/index.tsx
useHttp
for API calls.isLoading
state for better user feedback.index.tsx
Enhanced Confirm Delete Project with better API handling
apps/platform/src/components/dashboard/project/confirmDeleteProject/index.tsx
useHttp
for API calls.isLoading
state for managing loading indicators.index.tsx
Improved Create Project Dialogue with better API handling
apps/platform/src/components/dashboard/project/createProjectDialogue/index.tsx
useHttp
for API calls.isLoading
state for better user feedback.index.tsx
Enhanced Confirm Delete Variable with better API handling
apps/platform/src/components/dashboard/variable/confirmDeleteVariable/index.tsx
useHttp
for API calls.isLoading
state for managing loading indicators.page.tsx
Refactored Secret Page for better API handling
apps/platform/src/app/(main)/(project)/[workspace]/[project]/@secret/page.tsx
useHttp
for fetching secrets.page.tsx
Enhanced Main Page with better API handling
apps/platform/src/app/(main)/page.tsx
useHttp
for fetching projects and user data.layout.tsx
Improved Project Layout with better API handling
apps/platform/src/app/(main)/(project)/[workspace]/[project]/layout.tsx
useHttp
for fetching project and environment data.project.service.ts
Enhanced Project Service with consistent error handling
apps/api/src/project/service/project.service.ts
constructErrorBody
for consistent error messages.error-component.tsx
Introduced Error Boundary Component for API error handling
apps/platform/src/app/error-component.tsx
page.tsx
Enhanced Auth Page with better OTP handling
apps/platform/src/app/auth/page.tsx
useHttp
for sending OTP.secret.service.ts
Improved Secret Service with consistent error handling
apps/api/src/secret/service/secret.service.ts
constructErrorBody
for consistent error messages.user.service.ts
Enhanced User Service with consistent error handling
apps/api/src/user/service/user.service.ts
constructErrorBody
for consistent error messages.page.tsx
Improved Environment Page with better API handling
apps/platform/src/app/(main)/(project)/[workspace]/[project]/@environment/page.tsx
useHttp
for fetching environments.page.tsx
Enhanced Variable Page with better API handling
apps/platform/src/app/(main)/(project)/[workspace]/[project]/@variable/page.tsx
useHttp
for fetching variables.page.tsx
Enhanced Account Details Page with better API handling
apps/platform/src/app/auth/account-details/page.tsx
useHttp
for updating user details.api-key.service.ts
Improved API Key Service with consistent error handling
apps/api/src/api-key/service/api-key.service.ts
constructErrorBody
for consistent error messages.workspace.service.ts
Enhanced Workspace Service with consistent error handling
apps/api/src/workspace/service/workspace.service.ts
constructErrorBody
for consistent error messages.variable.ts
Updated Variable Controller for optional headers
packages/api-client/src/controllers/variable.ts
integration.service.ts
Improved Integration Service with consistent error handling
apps/api/src/integration/service/integration.service.ts
constructErrorBody
for consistent error messages.api-key.guard.ts
Enhanced API Key Guard with consistent error handling
apps/api/src/auth/guard/api-key/api-key.guard.ts
constructErrorBody
for consistent error messages.auth.service.ts
Improved Auth Service with consistent error handling
apps/api/src/auth/service/auth.service.ts
constructErrorBody
for consistent error messages.use-http.ts
Introduced useHttp Hook for API handling
apps/platform/src/hooks/use-http.ts
useHttp
hook for consistent API handling.auth.guard.ts
Enhanced Auth Guard with consistent error handling
apps/api/src/auth/guard/auth/auth.guard.ts
constructErrorBody
for consistent error messages.base.integration.ts
Improved Base Integration with consistent error handling
apps/api/src/integration/plugins/base.integration.ts
constructErrorBody
for consistent error messages.environment.ts
Enhanced Environment Utility with consistent error handling
apps/api/src/common/environment.ts
constructErrorBody
for consistent error messages.environment.service.ts
Improved Environment Service with consistent error handling
apps/api/src/environment/service/environment.service.ts
constructErrorBody
for consistent error messages.event.service.ts
Enhanced Event Service with consistent error handling
apps/api/src/event/service/event.service.ts
constructErrorBody
for consistent error messages.feedback.service.ts
Improved Feedback Service with consistent error handling
apps/api/src/feedback/service/feedback.service.ts
constructErrorBody
for consistent error messages.user.ts
Enhanced User Utility with consistent error handling
apps/api/src/common/user.ts
constructErrorBody
for consistent error messages.slug-generator.ts
Enhanced Slug Generator with better error handling
apps/api/src/common/slug-generator.ts
InternalServerErrorException
.util.ts
Introduced utility for constructing error messages
apps/api/src/common/util.ts
constructErrorBody
utility for consistent error messages.utils.ts
Introduced logout utility for clearing auth data
apps/platform/src/lib/utils.ts
logout
function for clearing authentication data.clear-auth-cookie.ts
Introduced utility for clearing auth cookies
apps/platform/src/lib/clear-auth-cookie.ts
2 files
create.variable.ts
Cleaned up Create Variable DTO imports
apps/api/src/variable/dto/create.variable/create.variable.ts
index.tsx
Cleaned up Navbar component imports
apps/platform/src/components/shared/navbar/index.tsx
1 files
page.tsx
Added placeholder for Roles Page
apps/platform/src/app/(main)/roles/page.tsx
1 files
pnpm-lock.yaml
Updated dependencies in pnpm-lock file
pnpm-lock.yaml
1 files
.eslintrc.cjs
Updated ESLint configuration for non-null assertions
apps/platform/.eslintrc.cjs
@typescript-eslint/no-non-null-assertion
rule.6 files