diff --git a/application/common/config/main.php b/application/common/config/main.php index d89e9855..3e44e810 100644 --- a/application/common/config/main.php +++ b/application/common/config/main.php @@ -1,11 +1,11 @@ user->isGuest) { + if ($appUser && !\Yii::$app->user->isGuest) { $prefixData['user'] = \Yii::$app->user->identity->email; } @@ -176,6 +176,11 @@ 'enabled' => !empty(Env::get('SENTRY_DSN')), 'dsn' => Env::get('SENTRY_DSN'), 'levels' => ['error'], + 'except' => [ + 'yii\web\HttpException:401', // Unauthorized + 'yii\web\HttpException:404', // NotFound + 'yii\web\HttpException:409', // Conflict + ], 'context' => true, // Additional options for `Sentry\init` // https://docs.sentry.io/platforms/php/configuration/options @@ -208,10 +213,10 @@ 'i18n' => [ 'translations' => [ '*' => [ - 'class' => 'yii\i18n\PhpMessageSource', - 'basePath' => '@frontend/messages', + 'class' => 'yii\i18n\PhpMessageSource', + 'basePath' => '@frontend/messages', 'sourceLanguage' => '00', - 'fileMap' => [ + 'fileMap' => [ 'app' => 'app.php', 'model' => 'model.php', ],