Skip to content

Show the actual Borg error in the status bar instead of the full traceback - #2572

Open
ahmershahdev wants to merge 2 commits into
borgbase:masterfrom
ahmershahdev:show-error-instead-of-traceback
Open

ahmershahdev wants to merge 2 commits into
borgbase:masterfrom
ahmershahdev:show-error-instead-of-traceback

Conversation

@ahmershahdev

Copy link
Copy Markdown
Contributor

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:

  • Simple and chained Python tracebacks
  • Borg-style traceback output with system information
  • Permission errors shown by a Borg job

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.

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

No deployments
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.

Improve error reporting

1 participant