on_conversion_failed method

on_conversion_failed

Registers a callback to be invoked when a page conversion fails, replacing any previously set handler on re‑invocation.

def on_conversion_failed(self, on_failed):
    ...
Parameter Type Description
on_failed Action[ConvertedPageContext, Exception] Callable that handles the failure, receiving the converted page context and the exception that caused the failure.

Returns: IConversionByPageHandlersStage: This stage, so additional handlers or Convert / Compress may be chained.

See Also