fix: Add error handling to dependencies + cleanup migrations
- Add detailed error handling in DependencyModel (throw exceptions on failure) - Add try-catch in ticket_dependencies.php to catch query errors - Remove all old migrations (001-014) that have already been run - Keep only new feature migrations (015-018) for reference Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,8 +74,12 @@ switch ($method) {
|
||||
ResponseHelper::error('Ticket ID required');
|
||||
}
|
||||
|
||||
$dependencies = $dependencyModel->getDependencies($ticketId);
|
||||
$dependents = $dependencyModel->getDependentTickets($ticketId);
|
||||
try {
|
||||
$dependencies = $dependencyModel->getDependencies($ticketId);
|
||||
$dependents = $dependencyModel->getDependentTickets($ticketId);
|
||||
} catch (Exception $e) {
|
||||
ResponseHelper::serverError('Query error: ' . $e->getMessage());
|
||||
}
|
||||
|
||||
ResponseHelper::success([
|
||||
'dependencies' => $dependencies,
|
||||
|
||||
Reference in New Issue
Block a user