show()andredeem()never reject: any failure (SDK not configured, network error, unexpected exception) resolves as{ status: 'dismissed', reason: { type: 'error', error } }. Notry/catchneeded.configure()returnsfalseon invalid input (and logs the reason); it does not throw.- Fire-and-forget methods (
identify(),setUserAttributes(),reset()) log errors to the console rather than throwing.
Reading an error from a result
redeem(), an error result leaves the pending transaction untouched, so calling
redeem() again later is safe. ({ status: 'none' } is never an error: it strictly means
there was nothing pending to redeem.)
EncoreError
ErrorCode
INITIALIZATION_ERROR is the one you’ll most likely see during integration: it means a
method ran before configure() succeeded.
The deferred pre-flight pair
A deferredshow() checks the required
host display values before any analytics
or UI, and distinguishes two failure classes in its dismissed result:
CONFIGURATION_ERROR: the remote config loaded but a required field is genuinely absent. The message names each missing field with its fixes (pass it indisplay.*, or set it in the Encore portal). Fix the integration; retrying won’t help.NETWORK_ERROR: the remote config was unreachable, so requiredness couldn’t be judged. Transient: the nextshow()call retries the fetch.
Related
show()·redeem(): the never-rejects result contractsconfigure(): validation behavior- Display Resolution: the pre-flight’s value chain in full