Skip to content

Commit 233a2f4

Browse files
committed
reverts bad merge
1 parent cd30b23 commit 233a2f4

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

packages/common-library/src/common_library/error_codes.py

-13
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,6 @@ def _create_timestamp() -> int:
5151
ts = datetime.now(UTC).timestamp() * _SECS_TO_MILISECS
5252
return int(ts)
5353

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-
6754

6855
def create_error_code(exception: BaseException) -> ErrorCodeStr:
6956
"""

0 commit comments

Comments
 (0)