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
Files changed (1) hide show
  1. 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
- return jsonify({'error': f'Parent Chunk 생성 쀑 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€: {str(e)}'}), 500
 
 
 
 
 
 
 
 
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