Error Handling

When encountering an exception during execution, a pipeline will stop immediately. The execution record will be updated with the error details as a warning message, and the execution will receive the status FAILED. All errors that occur during execution are also logged and visible in the Execution Logs page.

Debugging with Logging

The recommended way to monitor and debug your pipeline before moving to production is to use context.write_log() within your scripts. This allows you to trace the execution flow, inspect intermediate values, and identify issues without raising exceptions.

def my_script(context: wizata_dsapi.Context):
    df = context.dataframe
    context.write_log(f"Dataframe shape: {df.shape}", level=20)  # INFO

    if df.empty:
        context.write_log("Dataframe is empty, skipping processing", level=30)  # WARNING
        return df

    # YOUR LOGIC
    return df

Logs written with context.write_log() are visible in the Execution Logs page during experiment runs and printed to the console when running locally. For more details on logging levels and other context attributes, refer to the Context of a pipeline article.

AbortedException

wizata_dsapi.AbortedException is deprecated and no longer actively maintained. It is recommended to use context.write_log() for monitoring and debugging your pipelines instead.

Pipelines can also be interrupted manually from within a script using wizata_dsapi.AbortedException. An execution stopped this way receives the status ABORTED instead of FAILED, which allows you to distinguish between unexpected errors and intentional interruptions.

def script_abort(context: wizata_dsapi.Context):
    raise wizata_dsapi.AbortedException("pipeline aborted by script")