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


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

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


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


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


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


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


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.


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


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


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


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


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


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


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


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


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


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.


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.


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


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


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


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).


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


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


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


Code Context Cause
124 questionComponentEditor If no componentKey was found.