From 59b01d3f6d687a70332b05bedf689326aa0ba80d Mon Sep 17 00:00:00 2001 From: butschster Date: Wed, 31 May 2023 14:15:29 +0400 Subject: [PATCH] Fix problem with handling exceptions --- shared/src/GRPC/Interceptors/ExceptionHandlerInterceptor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(