From 9838176205dd3fac94f612002bb57a44d74bf789 Mon Sep 17 00:00:00 2001 From: idontknow <1245785295@qq.com> Date: Sat, 9 May 2026 15:58:06 +0800 Subject: [PATCH] Fix context field using class instead of instance in error handling (#2627) In process_site_result(), when a check_error is present, the context field was set to str(CheckError) (the class itself) instead of str(check_error) (the error instance). This caused the context to contain the string representation of the class rather than the actual error message. Before fix: context = "" After fix: context = "Request timeout error: slow server" --- maigret/checking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maigret/checking.py b/maigret/checking.py index 2cfc255..2c8f488 100644 --- a/maigret/checking.py +++ b/maigret/checking.py @@ -715,7 +715,7 @@ def process_site_result( MaigretCheckStatus.UNKNOWN, query_time=response_time, error=check_error, - context=str(CheckError), + context=str(check_error), tags=fulltags, ) elif check_type == "message":