Skip to content

feat: Implement Phase 2 Error Layer#2

Open
Maatify wants to merge 1 commit intomainfrom
feat/phase-2-implementation-17278358750513878118
Open

feat: Implement Phase 2 Error Layer#2
Maatify wants to merge 1 commit intomainfrom
feat/phase-2-implementation-17278358750513878118

Conversation

@Maatify
Copy link
Owner

@Maatify Maatify commented Feb 27, 2026

This PR implements the Phase 2 Error Layer as defined in docs/PHASE_2_EXECUTION_SPEC.md.

It introduces:

  • Value Objects: NormalizedError, ErrorContext, ErrorResponseModel for immutable data flow.
  • Normalization: DefaultThrowableToError maps MaatifyException and external Throwable to NormalizedError with strict fallback logic.
  • Formatting: JsonErrorFormatter (default envelope) and ProblemDetailsFormatter (RFC7807) for deterministic output.
  • Orchestration: ErrorSerializer to bind the pipeline.

All components are covered by unit tests ensuring 100% coverage and adherence to contracts. Determinism and safety (no leaked messages/traces) are strictly enforced.


PR created automatically by Jules for task 17278358750513878118 started by @Maatify

- Added NormalizedError, ErrorContext, ErrorResponseModel VOs
- Added ThrowableToErrorInterface and DefaultThrowableToError mapper
- Added FormatterInterface, JsonErrorFormatter, and ProblemDetailsFormatter
- Added ErrorSerializer orchestrator
- Implemented full test suite for new components with 100% coverage
- Enforced determinism and safety requirements

Co-authored-by: Maatify <130119162+Maatify@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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