exception translation

Catching a low-level exception at a boundary and throwing a higher-level one that fits the caller's vocabulary, keeping the original as the cause.

In more detail

A repository that lets a storage library's exception escape forces services and controllers to know about storage, and a library upgrade can then change your public signatures. Translating to a stable domain exception stops that leak. At the web boundary, a further translation turns domain exceptions into HTTP responses.

Related terms

Taught in

References