mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-10 21:46:45 +03:00
fix: resolve JSON parsing error and standardize HTTP client usage
- Fix JSON parsing error in getOrCreateGiteaOrg function (#19) - Add content-type validation before JSON parsing - Add response cloning for better error debugging - Enhance error messages with actual response content - Add comprehensive logging for troubleshooting - Standardize HTTP client usage across codebase - Create new http-client.ts utility with consistent error handling - Replace all superagent calls with fetch-based functions - Replace all axios calls with fetch-based functions - Remove superagent, axios, and @types/superagent dependencies - Update tests to mock new HTTP client - Maintain backward compatibility - Benefits: - Smaller bundle size (removed 3 HTTP client libraries) - Better performance (leveraging Bun's optimized fetch) - Consistent error handling across all HTTP operations - Improved debugging with detailed error messages - Easier maintenance with single HTTP client pattern
This commit is contained in:
@@ -313,7 +313,6 @@ export function ActivityLog() {
|
||||
setIsInitialLoading(true);
|
||||
setShowCleanupDialog(false);
|
||||
|
||||
// Use fetch directly to avoid potential axios issues
|
||||
const response = await fetch('/api/activities/cleanup', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
Reference in New Issue
Block a user