{{warning}}

A list of all possible errors that may be returned via the errorCallback handler in the constructor of the Player, Editor or Catalog launchers.

eg:

//onError will receive the errors below. 
function onError(err){
  console.error(err.code, err.msg);
}

var player = new org.corespring.players.Player('.holder', {}, onError);

INVALID_MODE

Code Context Cause
101 player calling setMode with a value other than gather, view or evaluate.

NO_ITEM_ID

Code Context Cause
102 player launching the catalog without specifing an itemId in the options.

NO_SESSION_ID

Code Context Cause
103 player launching the player without a sessionId and with mode:view or evaluate.

NOT_ALLOWED

Code Context Cause
104 player calling a method that may not be allowed, ie if secure:true and calling setMode('gather').

CANT_FIND_CONTAINER_FOR_PLAYER

Code Context Cause
106 player Cause: When launching the player you must specify a selector for the containing node. This error occurs if that selector doesn't find exactly a node.

NO_ITEM_OR_SESSION_ID

Code Context Cause
108 player When launching the player you must specify at least one itemId or sessionId.

PLAYER_NOT_REMOVED

Code Context Cause
110 player If you have loaded multiple players at the same time. You must remove the preceding one before loading another.

EDITOR_NOT_REMOVED

Code Context Cause
111 editor If you have loaded multiple editors at the same time. You must remove the preceding one before loading another.

INSTANCE_NOT_READY

Code Context Cause
112 all If you have tried to interact with the api, before the instance is ready. This shouldn't happen often.

NO_URL_SPECIFIED

Code Context Cause
115 all If no url has been configured for the iframe. This is an internal error.

INITIALISATION_FAILED

Code Context Cause
119 all If there was a failure loading the underlying iframe.

UPLOAD_URL_MISSING_FILENAME

Code Context Cause
122 questionComponentEditor If an uploadUrl was specified but is missing :filename from the url.

NO_COMPONENT_TYPE

Code Context Cause
123 questionComponentEditor If no componentType was specified in the launch options.

CALL_IS_UNDEFINED

Code Context Cause
125 questionComponentEditor If a call can't be found for an action. Internal.

EXTERNAL_ERROR

Code Context Cause
105 all Triggered by either errors that occur when launching the corespring launch js or errors when the content has been loaded into the iframe.

Internal: 'launch-error' can trigger it or errors in the launch.js.

CANT_FIND_IFRAME

Code Context Cause
106 player After launching and loading the content in an iframe, the iframe can't be found. This is unlikely to happen, but if there is js elsewhere on the page that removes iframes - this can happen.

MESSAGE_ERROR

Code Context Cause
109 player If there is a messaging error (using postMessage) between the root document and the iframe.

CREATE_ITEM_AND_DRAFT_FAILED

Code Context Cause
113 draftEditor Creating the draft + item failed. The msg will have more detail.

COMMIT_DRAFT_FAILED

Code Context Cause
114 draftEditor Commiting the draft failed. The msg will have more detail.

CREATE_ITEM_FAILED

Code Context Cause
115 editor Failed to create an item - may happen if you launch the editor with no itemId (it'll try and create one for you).

CANT_FIND_URL

Code Context Cause
117 all An internal error if a url can't be found for a given action.

LOAD_ITEM_FAILED

Code Context Cause
120 all If there was a failure loading the item.

LOAD_DRAFT_FAILED

Code Context Cause
121 draftEditor If there was a failure loading the draft.

INTERNAL_ERROR

Code Context Cause
124 questionComponentEditor If no componentKey was found.