We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7123e88 commit 225fb60Copy full SHA for 225fb60
src/firebase_functions/scheduler_fn.py
@@ -111,14 +111,14 @@ def on_schedule_wrapped(request: _Request) -> _Response:
111
if iso_str.endswith("Z"):
112
iso_str = iso_str[:-1] + "+00:00"
113
schedule_time = _dt.datetime.fromisoformat(iso_str)
114
- except Exception:
+ except ValueError:
115
# Fallback to strict parsing without fractional seconds
116
try:
117
schedule_time = _dt.datetime.strptime(
118
schedule_time_str,
119
"%Y-%m-%dT%H:%M:%S%z",
120
)
121
- except Exception as e:
+ except ValueError as e:
122
# If all parsing fails, log and use current UTC time
123
_logging.exception(e)
124
schedule_time = _dt.datetime.utcnow()
0 commit comments