mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Clean up exception handling code, closes #81
Makes sure things get logged properly.
This commit is contained in:
@@ -121,6 +121,7 @@ class TaskController extends Controller
|
||||
$repo->delete($id);
|
||||
return response()->json([], 204);
|
||||
} catch (\Exception $ex) {
|
||||
Log::error($ex);
|
||||
return response()->json([
|
||||
'error' => 'A server error occured while attempting to delete this task.'
|
||||
], 503);
|
||||
@@ -147,6 +148,7 @@ class TaskController extends Controller
|
||||
'status' => $resp
|
||||
]);
|
||||
} catch (\Exception $ex) {
|
||||
Log::error($ex);
|
||||
return response()->json([
|
||||
'error' => 'A server error occured while attempting to toggle this task.'
|
||||
], 503);
|
||||
|
||||
Reference in New Issue
Block a user