We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd30b23 commit 233a2f4Copy full SHA for 233a2f4
packages/common-library/src/common_library/error_codes.py
@@ -51,19 +51,6 @@ def _create_timestamp() -> int:
51
ts = datetime.now(UTC).timestamp() * _SECS_TO_MILISECS
52
return int(ts)
53
54
-_LEN = 12 # chars (~48 bits)
55
-
56
57
-def _generate_error_fingerprint(exc: BaseException) -> str:
58
- """
59
- Unique error fingerprint for deduplication purposes
60
61
- tb = traceback.extract_tb(exc.__traceback__)
62
- frame_sigs = [f"{frame.name}:{frame.lineno}" for frame in tb]
63
- fingerprint = f"{type(exc).__name__}|" + "|".join(frame_sigs)
64
- # E.g. ZeroDivisionError|foo:23|main:10
65
- return hashlib.sha256(fingerprint.encode()).hexdigest()[:_LEN]
66
67
68
def create_error_code(exception: BaseException) -> ErrorCodeStr:
69
"""
0 commit comments