3

I'd recommend using a service like Sentry or Bugsnag that are tailored exactly for this situation and include some Craft integrations as well: https://plugins.craftcms.com/search?q=sentry https://plugins.craftcms.com/search?q=bugsnag


1

The following is untested and unfinished, but I hope it might get you going: In Craft CMS, there is an event "EVENT_BEFORE_HANDLE_EXCEPTION", which you could use to handle exceptions. With a plugin or a module, you could do something like: Event::on( ErrorHandler::className(), ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION, ...


1

Errors for the users/save-user action are recorded against the user object, not the session object. If the user is logged-out, the object is named user but if they are logged-in you must use currentUser. Generally speaking you can retrieve errors from Yii objects in several ways, but for field-by-field errors, I prefer the simplicity of getFirstError() (You ...


Only top voted, non community-wiki answers of a minimum length are eligible