diff --git a/shared/src/GRPC/Interceptors/ExceptionHandlerInterceptor.php b/shared/src/GRPC/Interceptors/ExceptionHandlerInterceptor.php index 757ef91..944e31c 100644 --- a/shared/src/GRPC/Interceptors/ExceptionHandlerInterceptor.php +++ b/shared/src/GRPC/Interceptors/ExceptionHandlerInterceptor.php @@ -33,10 +33,13 @@ public function process(string $controller, string $action, array $parameters, C } $details = []; - while ($e->getPrevious()) { + $previous = $e->getPrevious(); + while ($previous !== null) { $details[] = new ErrorInfo([ 'domain' => $controller, ]); + + $previous = $previous->getPrevious(); } throw new GRPCException(