forked from loafle/openapi-generator-original
add #report when handling exceptions in the api (#21023)
This commit is contained in:
@@ -68,6 +68,7 @@ class DefaultController extends Controller
|
||||
$apiResult = $this->api->fooGet();
|
||||
} catch (\Exception $exception) {
|
||||
// This shouldn't happen
|
||||
report($exception);
|
||||
return response()->json(['error' => $exception->getMessage()], 500);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user