Map an AppError to a PresentationPolicy.
AppError
PresentationPolicy
Full AC-9 mapping:
Cancelled
Network
Internal
RateLimited
Auth
AccessDenied
Validation
Locked
NotFound
Conflict
Unsupported
ProviderSpecific
OCP: adding a new error variant = adding one case here. No other changes needed.
Map an
AppErrorto aPresentationPolicy.Full AC-9 mapping:
Cancelled→ silent (never shown)Network(retryable) → panel + toastInternal→ panel + toast (with trace ID)RateLimited→ panel + toast (with retry-after countdown)Auth/AccessDeniedin background context → panel onlyAuth/AccessDeniedin user-initiated context → panel + inlineValidation(user-initiated) → inline onlyLocked→ panel + inline (always blocks the active surface)NotFound→ panel + inlineConflict→ panel + toast (optimistic concurrency)Unsupported→ panel + toastProviderSpecific→ panel + toastOCP: adding a new error variant = adding one case here. No other changes needed.