Request\",\"status\":400,\"o:errorDetails\":[{\"de...
# general
t
Request\",\"status\":400,\"o:errorDetails\":[{\"detail\":\"Error while accessing a resource. The record you are attempting to load has a different type: noninventoryitem from the type specified: inventoryitem.\",\"o:errorCode\":\"USER_ERROR\"}]}\n"
d
Log itemRecord.getValue({fieldId: 'id'}) outside the record.load and check that it corresponds with the internal id of a non-inventory item.
I'd suspect you might need itemRecord.getValue({fieldId: 'internalid'}) instead