Skip to content

Make run_locally(ensure_success=True) raise the actual encountered exception #611

@janosh

Description

@janosh

when debugging a failing workflow with run_locally, it can be very helpful to have access to the exception object. currently, you always get the same generic error:

raise RuntimeError("Flow did not finish running successfully")

to see what went wrong, you have to run with

run_locally(log=True, ensure_success=True)

and then hunt for the error message in the logs which can be verbose

how about we raise the actual error message instead of this generic RuntimeError? a (possibly bad style) sketch of how to implement this:

Screenshot 2024-05-14 at 16 48 48

for the above to work, _run_job would have to be modified to return the caught exception:

Screenshot 2024-05-14 at 16 54 45

Metadata

Metadata

Assignees

No one assigned

    Labels

    uxUser experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions