diff --git a/modules/openapi-generator/src/main/resources/php-laravel/api_controller.mustache b/modules/openapi-generator/src/main/resources/php-laravel/api_controller.mustache index f033a07e361e..2fc988698207 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/api_controller.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/api_controller.mustache @@ -87,13 +87,8 @@ class {{controllerName}} extends Controller {{/isPathParam}} {{/allParams}} - try { - $apiResult = $this->api->{{operationId}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - } catch (\Exception $exception) { - // This shouldn't happen - report($exception); - return response()->json(['error' => $exception->getMessage()], 500); - } + + $apiResult = $this->api->{{operationId}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#responses}} {{#isArray}}