Removed redundant checks for connection tokens and streamlined error handling in server utilities. Enhanced redirect logic in the query provider to avoid unnecessary navigation when already on the target path.
The error message was unnecessary as the 'UNAUTHORIZED' code is sufficient to convey the issue. This simplifies the error handling and avoids potential redundancy or confusion in the system behavior.
The X-Zero-Redirect header logic was unnecessary and has been removed to streamline error handling. Error messages and redirection logic are now handled solely through TRPCError.
Added `X-Zero-Redirect` to both allowed and exposed headers in CORS configuration to ensure it can be utilized by the client. Removed an unnecessary TRPC error throw related to connection authorization for cleaner response handling.
Introduced the 'X-Zero-Redirect' header to streamline disconnection handling. Removed client-side redirection logic tied to "Invalid tokens" and updated the fetch interceptor to handle redirects based on the new header. This ensures a cleaner and more centralized redirection flow.
Upgraded "drizzle-kit" to 0.31.1 and adjusted "drizzle-orm" versioning for consistency. Additionally, updated Radix dependencies to their latest versions to ensure compatibility and improvements.
Upgraded `drizzle-kit` to version 0.31.1 for improved functionality. Updated the schema to refine token fields and added logic to handle invalid tokens by nullifying them and redirecting users to reconnect. Enhanced connections API to identify and return disconnected connections for better user experience.
Eliminated debug logs ('tr123' and 'tr246') from the mail route handler to clean up the codebase. These statements were not serving any functional purpose and were likely left behind from debugging.
Removed redundant logging statements to improve code clarity and maintainability. Also added signOut call in deleteActiveConnection to ensure proper cleanup of user sessions.
Implemented error handling for missing OAuth scopes, displaying user-friendly messages in the login flow. Enhanced TRPC middleware and client logic to trigger logout and redirect users to a dedicated error state. Refactored error indicator components to ensure UI consistency.