Skip to content

Commit 225fb60

Browse files
Update src/firebase_functions/scheduler_fn.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 7123e88 commit 225fb60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/firebase_functions/scheduler_fn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ def on_schedule_wrapped(request: _Request) -> _Response:
111111
if iso_str.endswith("Z"):
112112
iso_str = iso_str[:-1] + "+00:00"
113113
schedule_time = _dt.datetime.fromisoformat(iso_str)
114-
except Exception:
114+
except ValueError:
115115
# Fallback to strict parsing without fractional seconds
116116
try:
117117
schedule_time = _dt.datetime.strptime(
118118
schedule_time_str,
119119
"%Y-%m-%dT%H:%M:%S%z",
120120
)
121-
except Exception as e:
121+
except ValueError as e:
122122
# If all parsing fails, log and use current UTC time
123123
_logging.exception(e)
124124
schedule_time = _dt.datetime.utcnow()

0 commit comments

Comments
 (0)