You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest rollbar version (2.0.0). Rollbar has started throwing this exception recently. I could not find the relevant method from the stack trace.
Looks like Rollbar is trying the serialize the Query object involved in the exception (to include in the payload) and fails.
2020-05-31 20:30:03 Error: [Cake\Error\FatalErrorException] Uncaught RuntimeException: You cannot call all() on a non-select query. Use execute() instead. in /var/www/src/vendor/cakephp/cakephp/src/ORM/Query.php:1041
Stack trace:
#0 /var/www/src/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php(141): Cake\ORM\Query->all()
#1 /var/www/src/vendor/rollbar/rollbar/src/Utilities.php(102): Cake\ORM\Query->getIterator()
#2 /var/www/src/vendor/rollbar/rollbar/src/Utilities.php(159): Rollbar\Utilities::serializeForRollbar(Object(Cake\ORM\Query), NULL, Array, -1, 2)
#3 /var/www/src/vendor/rollbar/rollbar/src/Utilities.php(105): Rollbar\Utilities::serializeObject(Object(Cake\ORM\Query), NULL, Array, -1, 1)
#4 /var/www/src/vendor/rollbar/rollbar/src/Utilities.php(117): Rollbar\Utilities::serializeForRollbar(Array, NULL, Array, -1, 1)
#5 /var/www/src/vendor/rollbar/rollbar/src/Payload/Frame.php(111): Rollbar\Utilities::serializeForRollbar(Array, NULL, Array)
#6 in /var/www/src/vendor/cakephp/cakephp/src/ORM/Query.php on line 1041
Stack Trace:
- /var/www/dev/src/Error/RollbarErrorHandlerTrait.php:50
- /var/www/dev/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php:122
- [main] - [internal], line ??
The text was updated successfully, but these errors were encountered:
publicfunctionhandleException(Throwable$exception): void
{
$this->log($exception->getMessage(), LogLevel::ERROR);
if ($exceptioninstanceof PDOException) {
// Custom handling due to https://github.com/rollbar/rollbar-php/issues/492// Do not use `getTrace` as that will generate another Fatal like above
Rollbar::log(Level::ERROR, $exception->getMessage(), ['stacktrace' => $exception->getTraceAsString()], true);
} else {
Rollbar::log(Level::ERROR, $exception);
}
parent::handleException($exception);
}
I'm using the latest rollbar version (2.0.0). Rollbar has started throwing this exception recently. I could not find the relevant method from the stack trace.
Looks like Rollbar is trying the serialize the Query object involved in the exception (to include in the payload) and fails.
The text was updated successfully, but these errors were encountered: