Repository navigation
Show the actual Borg error in the status bar instead of the full traceback - #2572
Open
ahmershahdev wants to merge 2 commits into
Open
ahmershahdev wants to merge 2 commits into
ahmershahdev wants to merge 2 commits into
Conversation
For unexpected errors, Borg logs the full Python traceback as a separate log message. Vorta showed it in the status bar, cut off after 300 characters, so the actual error was not visible. Show only the exception line instead. The log file still gets the full traceback. Fixes borgbase#2527
This branch has not been deployed
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.
Fixes #2527
When Borg reports an error such as a permission failure, Vorta can receive both a readable error message and the full Python traceback. Since the status bar always displays the latest message, the traceback was shown there and usually got cut off due to its length.
This PR adds a small helper to extract the actual exception from Borg traceback messages. The shortened message is now used by the status bar and the job error list, while the complete traceback is still written to the log for debugging.
This also handles chained exceptions, Borg's appended system information, and errors coming from remote repositories. Normal messages are left unchanged.
Added tests covering:
Ruff and mypy pass, and the full CI suite passes across Python 3.10, 3.12 and 3.13, Ubuntu/macOS, and Borg 1.2.8/1.4.4.
The Jobs page reason column still reports these cases as Local Exception, which can be addressed separately.