Magento 2 – Post Dispatch Observers

event-observermagento2

I was wondering if the Magento trigger the postdispatch observers or not if the current controller action failed to pass the validation? For example, we have an observer created for action controller_action_postdispatch_customer_account_createpostso if the scenario failed to pass the customer_account_createPost action (i-e may be some validation which Magento handle) so my controller_action_postdispatch will still be executed in the failed scenario or it will only be executed in the success scenario?

Best Answer

I have found it by myself, Magento does not care if the event action return true/false, it will process the postdispatch observer in anyway.

Related Topic