Skip to content

Conversation

@shahabgohar
Copy link

@shahabgohar shahabgohar commented Aug 11, 2025

Description

Replaced all incorrect occurrences of:

use ApiPlatform\Core\Exception\ItemNotFoundException;
with the correct:

use ApiPlatform\Exception\ItemNotFoundException;
The wrong namespace caused ItemNotFoundException to be thrown when registering multiple Process Handlers for the same module (e.g., Leads). This fix ensures correct exception handling and consistent imports.

Motivation and Context

The incorrect import prevented the invocation of a second Process Handler in the Leads module and potentially other modules, despite the getProcessType() method being called. Correcting the namespace resolves the error and restores expected functionality.

How To Test This

Create a Process Handler for the Leads module (e.g., record-lead-update-status).

Verify it registers successfully.

Create a second Process Handler for the Leads module (e.g., record-lead-update-next-steps).

Before fix: second handler fails with ItemNotFoundException.

After fix: both handlers register and work as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@SuiteBot
Copy link

SuiteBot commented Aug 11, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants