Skip to content

refactor(event): streamline event controller error handling and improve code clarity#1504

Open
tyler-dane wants to merge 5 commits intomainfrom
fix/1483-400-cleanup
Open

refactor(event): streamline event controller error handling and improve code clarity#1504
tyler-dane wants to merge 5 commits intomainfrom
fix/1483-400-cleanup

Conversation

@tyler-dane
Copy link
Contributor

  • Removed try/catch blocks in the create, delete, and update methods of the EventController, replacing them with promise-based error handling using res.promise().
  • Added comprehensive JSDoc comments to the EventController class, detailing the purpose and functionality of the methods, particularly regarding error routing through the centralized error handler.
  • This refactor enhances code readability and maintains consistent error management across event operations.

Closes #1483

…ve code clarity

- Removed try/catch blocks in the create, delete, and update methods of the EventController, replacing them with promise-based error handling using `res.promise()`.
- Added comprehensive JSDoc comments to the EventController class, detailing the purpose and functionality of the methods, particularly regarding error routing through the centralized error handler.
- This refactor enhances code readability and maintains consistent error management across event operations.
…packages

- Added new dependencies for @InQuirer packages in yarn.lock, including @inquirer/ansi, @inquirer/checkbox, @inquirer/confirm, and others, to enhance user interaction capabilities.
- Updated package.json to include @inquirer/prompts version 8.3.0, ensuring the latest features and improvements are available for user prompts.
- This update improves the project's dependency management and ensures compatibility with the latest inquirer functionalities.
@tyler-dane tyler-dane force-pushed the fix/1483-400-cleanup branch from e8c441c to abf2c22 Compare March 3, 2026 03:38
…idation

- Introduced the `isGoogleError` utility to identify GaxiosError-like objects, improving error detection for Google API responses.
- Updated `isInvalidGoogleToken` to handle both string and numeric error codes, ensuring robust validation of invalid tokens.
- Added comprehensive tests for various Google error scenarios, including handling of GaxiosError-like structures and numeric error codes.
- This enhancement improves error management and user feedback during Google Calendar synchronization processes.
…ogle revocation handling

- Updated imports to streamline the authentication state utilities, moving from common utils to dedicated auth state utilities.
- Implemented new in-memory state management for Google authentication revocation, allowing for better handling of user sessions without persisting unnecessary data.
- Added comprehensive tests for the new Google authentication state utilities, ensuring robust functionality for revocation and session management.
- Enhanced existing components and hooks to utilize the new state management, improving overall code clarity and maintainability.
…gle handling

- Refactored imports to transition from common utility paths to dedicated authentication state utilities for better organization.
- Introduced a new `clearAuthenticationState` function to manage user logout processes effectively.
- Enhanced tests to cover the new Google authentication state utilities and ensure robust functionality.
- Updated various components and hooks to utilize the revised authentication state management, improving code clarity and maintainability.
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.

Backend is not removing google data after receiving invalid_grant

1 participant