MCPcopy Create free account
hub / github.com/Accenture/mcp-bench / record_error

Method record_error

utils/error_handler.py:341–352  ·  view source on GitHub ↗

Record an error occurrence. Args: operation_name: Name of the operation that failed exception: The exception that occurred

(self, operation_name: str, exception: Exception)

Source from the content-addressed store, hash-verified

339 self.total_errors = 0
340
341 def record_error(self, operation_name: str, exception: Exception) -> None:
342 """Record an error occurrence.
343
344 Args:
345 operation_name: Name of the operation that failed
346 exception: The exception that occurred
347 """
348 error_type = type(exception).__name__
349 key = f"{operation_name}:{error_type}"
350
351 self.error_counts[key] = self.error_counts.get(key, 0) + 1
352 self.total_errors += 1
353
354 def get_stats(self) -> dict:
355 """Get current error statistics.

Callers 2

async_wrapperFunction · 0.80
sync_wrapperFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected