mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-15 10:55:43 +00:00
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 = "<class 'maigret.errors.CheckError'>" After fix: context = "Request timeout error: slow server"
This commit is contained in:
+1
-1
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user