Skip to content

Commit b4c993e

Browse files
handle all cases
1 parent 826f49b commit b4c993e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sentry_sdk/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ class TimeoutThread(threading.Thread):
14871487
def __init__(
14881488
self, waiting_time, configured_timeout, isolation_scope=None, current_scope=None
14891489
):
1490-
# type: (float, int, Optional[Scope], Optional[Scope]) -> None
1490+
# type: (float, int, Optional[sentry_sdk.Scope], Optional[sentry_sdk.Scope]) -> None
14911491
threading.Thread.__init__(self)
14921492
self.waiting_time = waiting_time
14931493
self.configured_timeout = configured_timeout
@@ -1543,6 +1543,12 @@ def run(self):
15431543
except Exception:
15441544
reraise(*self._capture_exception())
15451545

1546+
raise ServerlessTimeoutWarning(
1547+
"WARNING : Function is expected to get timed out. Configured timeout duration = {} seconds.".format(
1548+
integer_configured_timeout
1549+
)
1550+
)
1551+
15461552

15471553
def to_base64(original):
15481554
# type: (str) -> Optional[str]

0 commit comments

Comments
 (0)