The hook callback, if configured.
The hook's option name, used in the report.
Consumer callback observing hook failures, when configured.
The resolved diagnostics mode for the request.
Arguments forwarded verbatim to the hook; the tuple type is inferred from the hook's own signature, so a mismatched call site fails compilation instead of needing a cast.
Invokes a user-supplied lifecycle hook without letting its exceptions escape into the request pipeline. A throwing hook is reported through the structured reportDiagnostic path whether an
onHookErrorobserver is configured. The hook error must not crash the request, be counted as an attempt, or distort retry and error classification.The observer path also uses reportDiagnostic, so the
Errorhanded toonHookErroralways carries the structured AniLinkDiagnostic record (with the raw thrown value as itscausewhen one exists), so an observer never has to handle both a bare user error and a structured record.