A housing microservice receives Claude SDK failures that must surface cleanly in the case UI. What mapping practice fits?
Select an answer to reveal the explanation.
Short Explanation
Don't forward raw Claude HTTP status codes for the UI to interpret—map exceptions into clean domain errors the UI already understands. You'll keep caseworkers from staring at protocol codes they can't act on.
Full Explanation
Housing microservices should map Claude SDK exceptions to domain errors the case UI already understands. Translation preserves operator workflows—timeouts, auth failures, and rate limits become stable application codes—without forwarding raw Claude HTTP status codes for the case UI to interpret, so caseworkers and residents get clear next steps on subsidy or maintenance cases.
Forwarding Claude HTTP status codes directly for the case UI to interpret fails because raw status codes expose protocol details and force the UI to translate HTTP semantics into case-relevant messages, which can leak implementation context and confuse users who need clear next steps.
Recording Claude errors in service logs with correlation IDs for support review fails conceptually: silent logging leaves the case UI unaware of the failure, so caseworkers see empty summaries with no retry or escalate path.
Queuing failed summarization jobs for deferred background replay by workers fails as an availability anti-pattern because it defers the error rather than surfacing it promptly, leaving the case UI hanging and risking stale or missed case updates for unrelated traffic.
Exam caveat: mapping tables must stay current when the SDK adds error classes, and unknown errors should fall back to a safe generic domain fault plus structured logging for on-call.
Operational check: simulate timeout, 401, and 429 from a fake Claude client, assert each maps to the documented domain error, and confirm the case UI shows a recoverable message instead of raw HTTP status codes or stack traces.