fix(security): neutraliser le contexte des erreurs expurgées
This commit is contained in:
@@ -121,6 +121,7 @@ def fetch_step(
|
||||
:raises PronoteAuthRotationError: Si une rotation du token d'authentification
|
||||
pronotepy est nécessaire : propagée telle quelle jusqu'au pipeline.
|
||||
"""
|
||||
critical_error: PipelineCriticalError | None = None
|
||||
try:
|
||||
lessons, school_events = fetcher.fetch_agenda()
|
||||
target_date = resolve_target_date(today or date.today(), lessons, school_events)
|
||||
@@ -130,9 +131,11 @@ def fetch_step(
|
||||
except PronoteAuthRotationError:
|
||||
raise
|
||||
except Exception as exc:
|
||||
raise PipelineCriticalError(
|
||||
critical_error = PipelineCriticalError(
|
||||
f"Récupération Pronote impossible : {redact_exception(exc)}", step="fetch"
|
||||
) from None
|
||||
)
|
||||
if critical_error is not None:
|
||||
raise critical_error from None
|
||||
|
||||
messages, warnings = _fetch_optional_messages(fetcher)
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user