Skip to content

fix: map leave approval employee errors correctly - #14

Merged
nooby6 merged 4 commits into
mainfrom
fix/leave-approval-error-mapping
Oct 27, 2026
Merged

nooby6 merged 4 commits into
mainfrom
fix/leave-approval-error-mapping

Conversation

@nooby6

@nooby6 nooby6 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace generic runtime/check exceptions in leave approval with explicit domain exceptions for missing and inactive employees.
  • Map missing employees to EMPLOYEE_NOT_FOUND / HTTP 404 and inactive employees to EMPLOYEE_INACTIVE / HTTP 409.
  • Add service regression tests proving invalid approvals do not write leave records or audit events, plus API error-mapping tests.

Validation

  • Added unit coverage; CI must run against the branch before merge.
  • No production branch changes; this PR targets main.

@nooby6
nooby6 merged commit da95cb1 into main Oct 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant