Skip to main content

EncoreError

EncoreError is a sealed, nested enum. show() never throws: presentation failures arrive as values, in .notPresented(.error(EncoreError)) on the PresentationResult (and claim failures as AdvertiserOutcome.failed(EncoreError)). Throwing APIs like revokeEntitlements() still throw an EncoreError. User dismissals and “no offers” are business outcomes, not errors; see DismissReason and NotPresentedReason.
Never block user actions on an SDK error. Always provide a fallback path so the user can complete their intended action: every non-success result, error or not, should fall through to your original flow.

Definition

Top-level cases

Nested cases

Helpers

Every EncoreError conforms to LocalizedError, so errorDescription gives a developer-readable summary. transport and protocol(.decoding) errors also expose the wrapped system error via the underlying property:

Handling errors

show() delivers errors as values on the result:
Throwing APIs like revokeEntitlements() still use do/catch:
The most common “failure” is not an error at all: it is the user declining an offer, recorded on the result’s dismissal axis. Every non-success result should fall through to your original flow.