-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Init Schema #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request restructures the domain model by replacing the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API as Web.Api
participant Exception as GlobalExceptionMiddleware
participant Service as Application Service
Client->>API: Request
API->>Service: Execute business logic
alt BusinessRuleException thrown
Service-->>Exception: Throw BusinessRuleException
else ValidationException thrown
Service-->>Exception: Throw ValidationException
else ApplicationException thrown
Service-->>Exception: Throw ApplicationException (wrapped in RequestProcessingException)
end
Exception->>Exception: Detect RequestProcessingException
Exception->>Exception: Unwrap inner exception
Exception->>Exception: GetExceptionDetails(inner exception)
alt Known custom exception
Exception->>Exception: Map to status code & message
else Standard .NET exception
Exception->>Exception: Map to status code & message
else Unknown
Exception->>Exception: Return 500 Internal Server Error
end
Exception-->>Client: HTTP Response + structured Error details
sequenceDiagram
participant App as ConversationAggregate
participant Msg as Message Entity
participant Constants as MessageRoles
App->>App: AddMessage(senderId, content, type, isFromBot)
alt isFromBot = true
App->>Constants: Get MessageRoles.Assistant
else isFromBot = false
App->>Constants: Get MessageRoles.User
end
App->>Msg: Create Message with Role property
Msg->>Msg: Role initialized (Assistant or User)
App->>App: Add to _messages collection
Note over Msg: Old: IsFromBot property<br/>New: Role = "assistant" or "user"
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (31)
💤 Files with no reviewable changes (10)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Refactor