Errors
Validation issues
validateAnuvaPresentation returns an ordered array of issues. Each issue has:
- stable
code; - JSON-style
path; - severity
error; - safe human-readable
message; and - optional non-secret context.
Representative codes include:
INVALID_FORMAT,UNSUPPORTED_CONTRACT_VERSION, andINCOMPATIBLE_VERSION;INVALID_STABLE_ID,DUPLICATE_ID,IDENTITY_MISMATCH, andDANGLING_REFERENCE;UNKNOWN_FIELD,UNKNOWN_SURFACE, andUNORDERED_TIMELINE;UNSAFE_CONTENT,UNSAFE_ASSET_URL, andEMBEDDED_NON_FONT_ASSET;MISSING_EMBEDDED_FONT,MISSING_ASSET_BINDING,INCOMPATIBLE_ASSET_SLOT, andINVALID_INTEGRITY; andUNSUPPORTED_FEATURE.
assertAnuvaPresentation throws AnuvaContractError with code
ANUVA_CONTRACT_INVALID and the same issues.
Player errors
Player and bridge failures use stable command codes including:
INVALID_REQUEST,MISSING_ENVELOPE, andCONTRACT_INVALID;NOT_LOADED,NOT_READY,LOAD_FAILED, andLOAD_CANCELLED;NON_MONOTONIC_TICK;UNKNOWN_FRAGMENT,FRAGMENT_NOT_ON_ACTIVE_SLIDE, andINVALID_FRAGMENT_COMMAND;MISSING_SLIDE; andMEDIA_SEEK_FAILEDandASSET_READINESS_FAILED.
Asset load failures use stable ASSET_NETWORK_FAILED, ASSET_TIMEOUT,
ASSET_HTTP_FAILED, ASSET_REDIRECTED,
ASSET_CONTENT_TYPE_MISMATCH, ASSET_INTEGRITY_MISMATCH, and
ASSET_DECODE_FAILED codes. Consumers branch on codes, not message prose.
Messages and issue context must not contain credentials, response bodies, private URLs with tokens, or arbitrary executable content.
Editor errors
Editor and authoring failures add stable codes including:
INVALID_EDITOR_REQUEST,UNKNOWN_EDITOR_COMMAND, andUNSUPPORTED_EDITOR_PROTOCOL_VERSION;DUPLICATE_REQUEST_ID,REVISION_CONFLICT,INVALID_SAVE_TRIGGER, andSAVE_VALIDATION_FAILED;SLIDE_NOT_FOUNDandSLIDE_SURFACE_MISMATCH;UNKNOWN_OPERATION,INVALID_AUDIT_CONTEXT, andOPERATION_PRECONDITION_FAILED;UNSAFE_LAYOUT_MAPPING,UNSAFE_FAMILY_MAPPING,SEMANTIC_CONTENT_LOSS,SEMANTIC_CARDINALITY_LOSS, andAMBIGUOUS_SEMANTIC_MAPPING; andUNSUPPORTED_RENDERER_VERSION,INVALID_SAFE_AREA, andOUTSIDE_SAFE_AREA.