Error action¶
Extbase offers an out of the box handling for errors. Errors might occur during the mapping of incoming action arguments. For example, an argument can not be mapped or validation did not pass.
How it works¶
Extbase will try to map all arguments within
ActionController
. During this process arguments will also be validated.If an error occurred, the class will call the
$this->errorMethodName
instead of determined$this->actionMethodName
.The default is to call
errorAction()
which will:Clear cache in case
persistence.enableAutomaticCacheClearing
is activated and current scope is frontend.Add an error Flash Message by calling
addErrorFlashMessage()
. It will in turn callgetErrorFlashMessage()
to retrieve the message to show.Return the user to the referring request URL. If no referrer exists, a plain text message will be displayed, fetched from
getFlattenedValidationErrorMessage()
.