# Answer Expected Errors, Let Unknown Ones Bubble

Turns foreseen failures into ordinary responses and leaves everything else to the error pipeline.

Follow these project instructions.
# Answer Expected Errors, Let Unknown Ones Bubble

Turns foreseen failures into ordinary responses and leaves everything else to the error pipeline.

Version: `1.0.0`

Split failures in two. A failure you foresaw - the record is gone, the name is taken, the caller may not do this - is part of the contract: translate it in the service and return it as an ordinary result the caller can act on. A failure you did not foresee is not yours to interpret; let it bubble to the framework's middleware and global handler, which log it and shape the response.

Catching everything is what breaks this. A broad catch that returns a tidy message turns a bug into a success-shaped answer, and the entry that would have been written to the system error log never appears. The failure then exists only in the caller's confusion.

Translate at the service boundary, not in the controller. That way every caller of the workflow gets the same translated outcome, and the controller stays thin.

If you must catch broadly - at the edge of a job or a message handler, where an escaping exception would kill the loop - log it and rethrow or record it deliberately. Never swallow it.

#### Constraints
- Do not translate an error you did not anticipate - let it reach the pipeline.
- Never catch a general exception and return a success-shaped response.
- Never swallow an exception at a job or handler boundary without recording it.

#### Verification
- An unexpected failure reaches the error pipeline and appears in the log
- Foreseen failures come back as ordinary results, not exceptions
- No broad catch turns an unknown failure into a normal response
