SOY NV AI
commited on
Commit
Β·
e044254
1
Parent(s):
455a587
Fix: Improve error handling for Parent Chunk creation with better error messages and file path validation
Browse files- app/routes.py +9 -1
app/routes.py
CHANGED
|
@@ -3708,7 +3708,15 @@ def create_file_parent_chunk(file_id):
|
|
| 3708 |
}), 500
|
| 3709 |
|
| 3710 |
except Exception as e:
|
| 3711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3712 |
|
| 3713 |
@main_bp.route('/api/files/<int:file_id>/process/parent-chunk', methods=['POST'])
|
| 3714 |
@login_required
|
|
|
|
| 3708 |
}), 500
|
| 3709 |
|
| 3710 |
except Exception as e:
|
| 3711 |
+
import traceback
|
| 3712 |
+
error_traceback = traceback.format_exc()
|
| 3713 |
+
error_msg = str(e)
|
| 3714 |
+
print(f"[Parent Chunk μμ±] β μμΈ λ°μ: {error_msg}")
|
| 3715 |
+
print(f"[Parent Chunk μμ±] Traceback:\n{error_traceback}")
|
| 3716 |
+
return jsonify({
|
| 3717 |
+
'error': f'Parent Chunk μμ± μ€ μ€λ₯κ° λ°μνμ΅λλ€: {error_msg}',
|
| 3718 |
+
'file_id': file_id
|
| 3719 |
+
}), 500
|
| 3720 |
|
| 3721 |
@main_bp.route('/api/files/<int:file_id>/process/parent-chunk', methods=['POST'])
|
| 3722 |
@login_required
|