-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Handle missing processed job/resume and patch invalid job type/remote… #418
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
base: main
Are you sure you want to change the base?
Handle missing processed job/resume and patch invalid job type/remote… #418
Conversation
… status - Add checks for missing processed_job and processed_resume in score improvement service - Patch job extraction to set default values for employmentType and remoteStatus if missing or invalid
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughThe changes introduce internal validation and patching of specific fields in job data extraction, ensuring required values are present and valid before model validation. Additionally, explicit error handling is added for missing processed job or resume data during scoring, providing clear error signaling in both synchronous and streaming flows. Changes
Sequence Diagram(s)sequenceDiagram
participant Agent
participant JobService
participant Validator
Agent->>JobService: Provide raw job JSON
JobService->>JobService: Patch 'location.remoteStatus' and 'employmentType'
JobService->>Validator: Validate patched JSON
Validator-->>JobService: Return validated job data
sequenceDiagram
participant ScoreService
participant DB
participant Client
ScoreService->>DB: Fetch processed job
alt Job not found
ScoreService-->>Client: Raise JobParsingError (run) / Yield error event (run_and_stream)
else Job found
ScoreService->>DB: Fetch processed resume
alt Resume not found
ScoreService-->>Client: Raise ResumeParsingError (run) / Yield error event (run_and_stream)
else Resume found
ScoreService->>Client: Continue with scoring logic
end
end
Estimated code review effort2 (~15 minutes) Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
… status
Pull Request Title
Improve job extraction defaults and add error handling for processed data
Related Issue
#386
Description
This pull request addresses two issues in the backend:
It adds explicit checks for missing processed_job and processed_resume objects in the score improvement service.
It patches the job extraction logic to automatically set default values for employmentType and remoteStatus if the extracted values are missing or invalid.
Type
Proposed Changes
Screenshots / Code Snippets (if applicable)
How to Test
Checklist
Summary by CodeRabbit