instructure/canvas-lms · error · OtherError
Invalid item identifier
Error message
Invalid item identifier
What it means
selectServerItem validates that the requested itemID exists in the previously fetched item list before appending it to the selection state. If no list entry's value matches the given itemID, the ID does not correspond to any visible course/content item, so OtherError is raised.
Solutions
- Re-fetch the item list with getServerItems and select an itemID from that fresh list
- Confirm the item exists and is visible to the authenticated teacher in the session scope
- Clear the client's cached selection state and restart the Respondus wizard
Example fix
// before
client.selectItem("course", "123456") // stale id
// after
items = client.getItems("course")
client.selectItem("course", items.first.value) Defensive patterns
Strategy: validation
Validate before calling
valid_ids = getServerItems(session, "course").map(&:value) raise "unknown item id" unless valid_ids.include?(itemID)
Try / catch
begin servant.selectServerItem(session, "course", itemID) rescue RespondusApi::OtherError refresh item list and reselect end
Prevention
- Always select IDs from a freshly fetched list
- Do not cache item IDs across sessions
- Verify the item is visible to the authenticated user's scope
When it happens
Trigger: Calling selectServerItem with itemType "course" or "content" and an itemID that was never returned by getServerItems for the current session, or an ID belonging to a course outside the session's scope.
Common situations: Stale Respondus client cache referencing a deleted or renamed course; client hard-coding item IDs from another Canvas account/shard; session scope changed between listing and selecting.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/f8101e71a9411621.
Report an issue: GitHub.
Appendix: source
Thrown at gems/plugins/respondus_soap_endpoint/lib/respondus_soap_endpoint/urn_RespondusAPIServant.rb:315
#
def selectServerItem(userName, password, context, itemType, itemID, clearState)
selection_state = session["selection_state"] ||= []
if clearState == "true"
selection_state.clear
end
if itemType == "none"
return []
end
# call the unwrapped version of getServerItem
list, _ = _getServerItems(userName, password, context, itemType)
case itemType
when "course", "content"
if list.item.find { |i| i.value == itemID }
selection_state << itemID
else
raise OtherError, "Invalid item identifier"
end
else
raise OtherError, "Invalid item type"
end
[]
end
# SYNOPSIS
# PublishServerItem(userName, password, context, itemType, itemName, uploadType, fileName, fileData)
#
# ARGS
# userName C_String - {http://www.w3.org/2001/XMLSchema}string
# password C_String - {http://www.w3.org/2001/XMLSchema}string
# context C_String - {http://www.w3.org/2001/XMLSchema}string
# itemType C_String - {http://www.w3.org/2001/XMLSchema}string
# itemName C_String - {http://www.w3.org/2001/XMLSchema}string
# uploadType C_String - {http://www.w3.org/2001/XMLSchema}stringView on GitHub (pinned to 1c9f0bb801)