Shorter short error messages.

This commit is contained in:
2026-08-13 05:19:50 +00:00
parent a99996bd9c
commit 7ac373179b
2 changed files with 18 additions and 1 deletions
+9
View File
@@ -72,6 +72,15 @@ def test_backend_error_pipeline_backend():
assert isinstance(err, PreviewBackendError)
def test_backend_error_short_message_strips_source_and_detail():
"""Backend messages like "source: summary: detail" become just the summary."""
err = backend_error(
"vips",
"pyvips: cannot decode image: unable to load from file b'/mnt/c/Users...",
)
assert err.short == "cannot decode image"
def test_error_pickle_round_trip():
"""Exceptions survive pickling (the worker pool wire) intact."""
err = onlyoffice_error_from_code("-8")