AOSSIE-Org / AOSSIE-Org/EduAid

[BUG]: Unhandled SSL/TLS failure in Wikipedia augmentation causes 500 on /get_mcq

Đang mở
#428 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
JavaScript
Star
171
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Bug Description

While testing PDF input (~11 questions) with "Use Wikipedia" enabled, I encountered an SSL EOF error originating from the MediaWiki API call.
- The exception propagates up the request path and results in a 500 response from `/get_mcq` .Hence leading to unending request and failures .

## Current Behavior

- External MediaWiki SSL failure is not handled
- Entire request fails
- No graceful fallback
- User receives generic 500

## Expected Behavior

If Wikipedia augmentation fails:
- Log warning
- Continue quiz generation without Wikipedia enrichment
- Return structured success response
- Optionally notify user enrichment was skipped

### Steps to Reproduce

1. Upload a larger PDF (tested with ~10–11 questions)
2. Enable "Use Wikipedia"
3. Submit request
4. Backend returns 500 with SSLError (EOF occurred in violation of protocol)

### Logs and Screenshots

Image

```
(Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:2427)')))
127.0.0.1 - - [12/Feb/2026 23:44:09] "POST /get_mcq HTTP/1.1" 500 -
```

### Environment Details

_No response_

### Impact

High - Major feature is broken

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.