Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

[ICC-245] 응답구조 수정#113

Merged
GulSauce merged 1 commit into
developfrom
ICC-245-response
Feb 1, 2026
Merged

[ICC-245] 응답구조 수정#113
GulSauce merged 1 commit into
developfrom
ICC-245-response

Conversation

@GulSauce
Copy link
Copy Markdown
Member

@GulSauce GulSauce commented Feb 1, 2026

📢 설명

해당 Pull Request에 대해 간략하게 설명해주세요!

✅ 체크 리스트

  • 리뷰어가 체크할 내용을 작성해주세요!

Summary by CodeRabbit

Release Notes

  • New Features

    • Explicit error response handling in streaming operations with detailed error codes and messages.
  • Bug Fixes

    • Improved error reporting in quiz generation; errors now explicitly returned instead of silently handled.
  • Refactor

    • Updated internal data models and structure for quiz responses.
  • Style

    • Code formatting adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

@GulSauce GulSauce merged commit a33acc0 into develop Feb 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 1, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This change refactors the response data models and enhances error handling in the quiz generation service. It introduces a new ErrorResponse DTO, restructures the quiz response hierarchy by extracting ProblemSetDTO and renaming ProblemResponse to ProblemDTO, and updates the generation service to explicitly yield error responses during streaming instead of silently continuing.

Changes

Cohort / File(s) Summary
Data Transfer Object Refactoring
app/dto/response/error_response.py, app/dto/response/generate_response.py, app/dto/model/problem_set.py
New ErrorResponse class added with type, code, and message fields. GenerateResponse refactored to inherit from new ProblemSetDTO base class with type field. ProblemResponse renamed to ProblemDTO. Selection.correct field definition condensed.
Service Layer Updates
app/service/generate_service.py
Updated to yield ProblemSetDTO and ErrorResponse objects in streaming path. Error handling now explicitly returns ErrorResponse with status codes instead of silent continuation. process_single_chunk signature changed to return Optional[ProblemSetDTO]. Quiz item construction updated to use ProblemDTO.
Code Cleanup
app/service/explanation_service.py, app/util/create_chunks.py
Minor whitespace adjustments: removed blank lines after function/method signatures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through code so neat,
Error responses now complete!
DTOs dance in fresh array,
ProblemSetDTO leads the way—
Streaming errors, no more hide,
✨ Just responses, far and wide!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ICC-245-response

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@GulSauce GulSauce deleted the ICC-245-response branch March 8, 2026 09:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant