diff --git a/src/Exception/Handler/GatewayExceptionHandler.php b/src/Exception/Handler/GatewayExceptionHandler.php index 378cc59..0882377 100644 --- a/src/Exception/Handler/GatewayExceptionHandler.php +++ b/src/Exception/Handler/GatewayExceptionHandler.php @@ -62,7 +62,7 @@ class GatewayExceptionHandler extends ExceptionHandler $responseData = [ 'code' => $code, 'message' => $message, - 'data' => null, + 'data' => method_exists($throwable, 'getData') ? $throwable->getData() : null, ]; return $response