X
X
XenK2017-12-16 16:37:06
PHP
XenK, 2017-12-16 16:37:06

How to filter custom exceptions?

In my project, I use the Sentry service , with a library for Yii2.
In some moments, I display exceptions, such as:

if (!$hasMoney) {
            throw new BadRequestHttpException('Недостаточно средств');
        }

Accordingly, I receive a notification about this exception, in Sentry. What is the best thing to do in this situation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2017-12-16
@SPAHI4

The docs for yii2-sentry says:

log' => [
            'targets' => [
                [
                    'except' => [
                        'yii\web\HttpException:404',
                    ],
                ],
            ],
        ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question