Coverage for merco/core/llm/errors.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-07 14:04 +0800

1"""LLM error helpers — thin wrappers around error_ui. 

2 

3Kept for backward compatibility; new code should use 

4``merco.core.llm.error_ui`` directly. 

5""" 

6from __future__ import annotations 

7 

8from merco.core.llm.error_ui import ( # noqa: F401 

9 ErrorInfo, 

10 classify_error, 

11 sanitize_message, 

12 build_error_panel, 

13 build_retry_line, 

14 retry_spinner, 

15 error_message, 

16) 

17 

18 

19def llm_error(exc: Exception) -> str: 

20 """Backward-compatible wrapper: convert an exception to a user-facing 

21 error message. Delegates to error_ui.""" 

22 return error_message(classify_error(exc))