Is there a way to log exceptions caught in the element-api actionIndex? The code looks like it catches exceptions thrown.
For context, we want to log exceptions that cause 500s in my element-api to Rollbar.
Event::on(
ErrorHandler::class,
ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION,
function (ExceptionEvent $event) {
Rollbar::error($event->exception);
}
);
Is there a way to log exceptions caught in the element-api actionIndex? The code looks like it catches exceptions thrown.
https://github.com/craftcms/element-api/blob/v2/src/controllers/DefaultController.php#L165
For context, we want to log exceptions that cause 500s in my element-api to Rollbar.
Current code to log exceptions: