Skip to content

Enhance MissingFaultPath Rule to Check Action Elements #214

@tomkittlabs

Description

@tomkittlabs

I'd like to suggest an enhancement to the existing MissingFaultPath rule to broaden its scope and improve error handling coverage in Flows.

Current Behaviour:
The MissingFaultPath rule currently checks for missing fault paths, presumably focusing on DML elements (recordCreates, recordUpdates, recordDeletes, recordLookups) where failures are common and need handling. However, it doesn't appear to explicitly check actionCalls elements (e.g. Send Email, Invocable Apex Actions, HTTP Callouts)

Proposed Enhancement:
I propose enhancing the existing MissingFaultPath rule:

Description: Modify the rule's logic so that, in addition to checking DML elements, it also checks elements of type actionCalls to ensure they have a faultConnector defined.

Expected Behaviour: The scanner flags both DML elements and Action elements that are missing a defined fault path.

Justification: Actions, especially commonly used ones like Send Email as well as custom Invocable Actions or HTTP callouts are common points of failure in Flows due to exceptions in the called code, callout limits or invalid inputs. Ensuring these actions have fault paths is just as critical for robust error handling as it is for DML operations. Extending the existing rule provides a more comprehensive check for unhandled errors.

Implementation Notes: The rule's element identification logic would need to be updated to include actionCalls (or similar type identifier) alongside the existing DML element types it checks for the absence of a faultConnector.

Documentation:
Salesforce Well Architected Patterns & Anti-Patterns -

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions