true, 'Tasks' => $tasks]); } catch (Throwable $e) { http_response_code(500); apiAbort(['OK' => false, 'ERROR' => 'Failed to fetch tasks: ' . $e->getMessage()]); }