mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 15:11:13 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -224,16 +224,17 @@ export async function approveSubmissionItems(
|
||||
// Add to dependency map for child items
|
||||
dependencyMap.set(item.id, entityId);
|
||||
|
||||
} catch (error: any) {
|
||||
console.error(`Error approving ${item.item_type} item ${item.id}:`, error);
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
console.error(`Error approving ${item.item_type} item ${item.id}:`, errorMsg);
|
||||
|
||||
// Update item with error status
|
||||
await updateSubmissionItem(item.id, {
|
||||
status: 'rejected',
|
||||
rejection_reason: `Failed to create entity: ${error.message}`,
|
||||
rejection_reason: `Failed to create entity: ${errorMsg}`,
|
||||
});
|
||||
|
||||
throw new Error(`Failed to approve ${item.item_type}: ${error.message}`);
|
||||
throw new Error(`Failed to approve ${item.item_type}: ${errorMsg}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user