Creating and updating list items via jQuery/REST. The script has been functional for roughly four months now, but this morning decided to start throwing an error.
error: {code: "-2147024809, System.ArgumentException",…} code: "-2147024809, System.ArgumentException" message: {lang: "en-US", value: "Value does not fall within the expected range."} lang: "en-US" value: "Value does not fall within the expected range."
Google feeds me information on this error in regards to working with files, and the pathway not being specified properly, but I can't seem to figure out why this would have ceased functioning. I've verified the access method for both GET and DELETE actions, but creating new records and updating existing ones throws the same error.
Create snippet below:
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('List Name')/items",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
async: false,
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
},
success: function (data,textStatus, jqXHR) {
...do stuff...
},
error: function (jqXHR,textStatus,errorThrown) {
...make noise...
}
});
I've validated the item's data in the error function, and that _spPageContextInfo.webAbsoluteUrl is properly evaluating to the desired URL. The list is larger, but the operations were functional above the 5000 item limit until today.
Thanks in advance for any assistance.
EDIT: Just tried to apply updates directly to the list and the error is coming up from the datasheet view without highlighting any offending columns. So it's not a script error, but something in the list itself causing the problem.