After checking, application.error does not exist. It's "dispatch.error". But please, use MvcEvent::DISPATCH_ERROR instead of hardcoding keys.