Repository navigation
feat: Implement client version handling and update error management - #738
Merged
Merged
Conversation
- Added a new middleware to handle client version checks and block requests if the CLI version is unsupported. - Introduced `ClientVersionUnsupportedError` to manage version-related errors. - Updated error handling to provide user-friendly messages when the CLI version is blocked. - Enhanced the `catchError` utility to differentiate between regular errors and version-related errors. - Modified various services and commands to integrate version checks and handle errors appropriately. - Added tests to ensure correct behavior when the CLI version is unsupported. This update improves the user experience by guiding users to update their CLI version when necessary.
- Updated `AuthService` to throw specific errors for unsupported client versions during security detail requests. - Modified `UniversalLinkService` to append a reason to the error page URL when login is blocked due to client version issues. - Added tests to verify correct behavior when handling unsupported client versions in both `AuthService` and `UniversalLinkService`. These changes improve error reporting and user guidance for CLI version compatibility.
larryrider
requested changes
Nov 6, 2026
- Added relogin functionality to handle session expiration more gracefully. - Enhanced error handling for unsupported client versions with clearer messaging. - Introduced new functions to manage version checks and auto-healing behavior. - Improved logging for WebDAV server status and re-enablement attempts. These changes enhance the robustness of the keepalive mechanism and provide better user feedback during session management.
|
larryrider
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
The CLI now handles the backend's client-version block (
errorCode: CLIENT_VERSION_UNSUPPORTED) in commands, WebDAV and the browser login. Blocked users get clear update instructions instead of a raw 403.Why
The backend (internxt/drive-server-wip#1270) can now reject outdated clients. Without this, CLI users see
Request failed with status code 403, WebDAV returns confusing errors, and a blocked token refresh deletes the saved login.How
errorCode: CLIENT_VERSION_UNSUPPORTEDin the response body, never by the HTTP status.docker pull), then exit 1.login-legacy. A blocked browserloginredirects to/auth-link-error?reason=CLIENT_VERSION_UNSUPPORTED.