Removed try/catch to enable framework error handling to pick up the error (#21523)

This commit is contained in:
Henk van de Berg 2025-08-01 10:15:05 +02:00 committed by GitHub
parent 97aa4a8587
commit faa3a0e4c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}}