SDK 2.0.0. Auth failures: Auth & License.
FacebetterError. Numeric code values are listed below. Some load / auth failures use a string code instead.
Numeric codes
JavaScript-layer codes (string)
These are thrown duringinit() / load / auth:
Init checklist
- Config is valid: non-empty
licenseToken. - The SDK can download its runtime files (
facebetter-corepackage, or files next to the UMD script). - Page is a secure context.
- Dashboard domain matches the page origin (production).
- Production does not embed
appKeyin frontend JS.
Parameter and process errors
Beauty intensities must be[0.0, 1.0]. Reshape must be [-1.0, 1.0]. Out of range throws FacebetterError before the native call.
processImage throws if the engine is not initialized, buffers cannot be allocated, or the native process returns a non-zero status. Validate video readyState and non-zero videoWidth / videoHeight before calling.
Empty filter / sticker / background paths are rejected; use clearFilter(), clearSticker(), or clearVirtualBackground().
Engine events vs exceptions
Auth / init can also arrive ononEngineEvent (EngineEventCode 0 / 1 / 100 / 101) after init() has already resolved. Listen for LicenseValidationFailed and InitializationFailed even if init() did not throw.

