Extract error message handling to _error_handling module#1988
Merged
adamtheturtle merged 1 commit intomainfrom Feb 22, 2026
Merged
Extract error message handling to _error_handling module#1988adamtheturtle merged 1 commit intomainfrom
adamtheturtle merged 1 commit intomainfrom
Conversation
Move the _get_error_message function from commands.py to a new _error_handling.py module and make it public as get_error_message. This allows other modules to reuse the error handling logic. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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.
Summary
Move the error message mapping logic from
commands.pyto a new_error_handling.pymodule and expose it as a publicget_error_messagefunction. This allows other CLI modules to reuse the same error handling logic.Changes
src/vws_cli/_error_handling.pywith the extracted error message functionsrc/vws_cli/commands.pyto import and use the new modulecommands.pyTest plan
Note
Low Risk
Pure refactor that centralizes error-message mapping; behavior should remain the same aside from potential import/path issues.
Overview
Extracts VWS exception-to-message formatting from
commands.pyinto a newvws_cli/_error_handling.pymodule asget_error_message.commands.pynow imports and usesget_error_messagein_handle_vws_exceptions, and removes the inlined helper plus now-unused exception/import types.Written by Cursor Bugbot for commit 154dff3. This will update automatically on new commits. Configure here.