mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 16:33:56 +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}}
|
{{/isPathParam}}
|
||||||
|
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
try {
|
|
||||||
$apiResult = $this->api->{{operationId}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
|
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
{{#responses}}
|
{{#responses}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user