From 73c81a00a10766900318d86640249d1b54c6b351 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 4 Apr 2026 16:32:16 -0500 Subject: feat: specific error messages for fetch failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add HTTP status code checking (wttrin--extract-http-status) and pass error descriptions through the callback chain so users see "Location not found (HTTP 404)" or "Network error — check your connection" instead of the generic "Perhaps the location was misspelled?" for every failure. Also fix pre-existing bug where the condition-case error handler in extract-response-body killed an unrelated buffer after unwind-protect already cleaned up. 330 tests (was 307), all passing. --- tests/test-wttrin-ansi-color-rendering.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test-wttrin-ansi-color-rendering.el') diff --git a/tests/test-wttrin-ansi-color-rendering.el b/tests/test-wttrin-ansi-color-rendering.el index e2bf82b..accada9 100644 --- a/tests/test-wttrin-ansi-color-rendering.el +++ b/tests/test-wttrin-ansi-color-rendering.el @@ -316,7 +316,7 @@ This verifies the fetch function returns unfiltered data from wttr.in." (testutil-wttrin-mock-http-response testutil-wttrin-sample-ansi-response (wttrin-fetch-raw-string location - (lambda (data) + (lambda (data &optional _error-msg) (setq callback-data data))) ;; Verify callback received ANSI codes -- cgit v1.2.3