mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 00:13:50 +00:00
Removed try/catch to enable framework error handling to pick up the error (#21523)
This commit is contained in:
parent
97aa4a8587
commit
faa3a0e4c1
@ -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}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user