Search.../

Wix Data Error Codes

When you use the Wix Data API, you may encounter errors. This list includes the error codes and messages returned by the API and more information to help you resolve issues. If an error persists, contact support for help.

Code
Message
Troubleshooting
WDE0001Collection name must be a string.Check that the collection name you provided is a valid string.
WDE0002Item ID must be a string.Check that the item _id you provided is a valid string.
WDE0003Field name must be a string.Check that the field name you provided is a valid string.
WDE0004Failed to save {your item name} into {your collection name}. Items must be JavaScript objects.Check that the item you're saving is a valid JavaScript object.
WDE0005Failed to bulk save items into {your collection name}. Items must be an array of JavaScript objects and item IDs must be strings if present.One or more of the items you tried to save was invalid. Check that the items are an array of valid JavaScript objects and that any _id properties in the items are strings. A valid ID key-value pair looks like this:
'_id': 'ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb'.
WDE0006Failed to bulk save items into {your collection name}.Cannot insert more than 1000 items in one request.You tried to save too many items at once. Avoid this error by splitting up your request into batches of fewer than 1000 items.
WDE0007Invalid update. Updated object must have an _id property that is a string.Check that the object you passed for the item parameter has a property called _id whose value is a valid string.
WDE0008wixData.{the function you called} expects between {minimum} and {maximum} arguments, but was called with {the number of arguments you provided}.The wrong number of arguments were passed to the function. Check your code to make sure that you are passing a valid number of arguments, and that you separate the argument values with commas.
WDE0009Document is too large.The maximum size for a single collection item is 512 KB. Check that the items you're adding are smaller than this.
WDE0011Invalid .filter usage. .filter requires WixDataFilter.Check that the argument passed to the WixDataAggregate filter() function is a valid WixDataFilter object.
WDE0012Invalid {function you called} usage. Filter is already set.You are trying to use this function to set a filter, but you've already set one. You can only set one filter at a time. Check your code to see where the previous filter was set.
WDE0013Invalid .group usage. Group is already set.You are trying to use the group() function to set a group for your aggregation, but you've already set one. You can only set one group at a time. Check your code to see where the previous group was set.
WDE0014Requests per minute quota exceeded.Your site has exceeded the quota of the maximum number of data requests per minute. Learn more about this quota and how to prevent this error.
WDE0016Filter must be an object.Check that your filter is a valid WixDataFilter object. See the API Reference to learn how to build one.
WDE0018Options must be an object with one or all of the following boolean properties: {expected properties for your function}Check that the options object you provided for a function is valid.

For example, the save() function accepts 2 optional properties in its options parameter, supressAuth, and supressHooks. Defining an options parameter that has one of those properties whose value isn't a boolean results in an error.

To find the appropriate options properties for the function you're using, consult the API Reference.
WDE0019Reference operation takes a string ID or an object with an ID to be connected.Check that the argument passed to a function dealing with reference fields is either an item ID string or an object with an _id field. This error applies to the referringItem and referencedItem parameters of the isReferenced(), replaceReferences(), and removeReference() functions and the item parameter of queryReferenced() function.
WDE0020Provided relationship attribute {your field name} is not a multi-reference field.Check that the collection field you're adding a multi-reference value to is a multi-reference type.
WDE0021Invalid referenceCheck that the referring and referenced items you provided are valid. A valid referring item is either an _id string or an object with an _id property. A valid referenced item is either an _id string, an object with an _id property, or an array of _id strings.
WDE0022Unable to execute a query. Only single multi-reference field can be included.Your query includes more than the maximum of one multi-reference field. Learn more.
WDE0023Cannot fetch more than 50 elements when include is being used on multi-reference fieldYour query reached the limit of more than 50 referenced items. To retrieve more than 50 referenced items, use the queryReferenced() function. Learn more about querying items that reference other items.
WDE0024Field is deletedThe field you're trying to access was deleted. Restore the field in the Content Management System (CMS) before using it in your code.
WDE0025The {your collection name} collection does not exist. You cannot work with a collection using the Data API before it is created in the Editor.Check that the collection you're trying to access exists on your site.
WDE0026The {your collection name} collection was removed, so you cannot work with it. To restore its data, create a new collection with the same name.You're trying to access a deleted collection in your code. Restore the collection by creating a new collection with the same name.
WDE0027The current user does not have permissions to {some action} on the {your collection name} collection.A data request was made with insufficient permissions. Set up your collections permissions based on your site's needs.
WDE0028Operation time limit exceeded.Your data request ran for more than 5 seconds and timed out. The request was terminated. If this error persists, it may be because your request is working with large amounts of data. Learn more about this quota and how to prevent this error.
WDE0037Invalid query on {your collection name}, invalid prev positioned query skip on a negative number.Check that the skip value you provided for the query is 0 or greater.
WDE0044Invalid {function name} parameter value. {function name} parameter must be a String.Check that the parameter value indicated in the error message is a string.
WDE0052The current site is in template mode. Please save it to modify data.To modify collection data on a site created from a template, make sure to save the site first.
WDE0053Internal wixData error: {error message}An unexpected error occurred. If the error persists, please contact support.
WDE0054WD_UNKNOWN_ERRORAn internal server error. Please try running your code again.
WDE0068Item IDs must be an array of stringsCheck that the bulkRemove() function received an array of strings representing the IDs of the items you want to remove as its second argument.

Here is an example of a valid array: ['ffdkj9c2-df8g-f9ke-lk98-4kjhfr89keedb', 'afthj8s4-dt7u-g4fr-at23-6joedh34awshy'].
WDE0069Failed to remove items from {your collection name}. Cannot remove more than 1000 items in one requestYou tried to remove too many items from a collection at once. Avoid this error by splitting up your request into batches of 1000 items or fewer. To remove all the items in a collection, use truncate().
WDE0073Item {requested item's ID} does not exist in collection {your collection name}.Check that an item with the ID you're requesting exists in the collection you're querying.
WDE0074WD_ITEM_ALREADY_EXISTSAn item with the requested ID value already exists. This error occurs when you try to insert an item into a collection with an _id value that already exists in that collection. If you are trying to either insert a new item or update it if it already exists, use save().
WDE0075WD_BAD_REQUESTThis error occurs when you make an invalid request using the aggregate() function. See the API reference for details on building the WixDataAggregate objects used with this function.
WDE0076Validation error. {error message from Wix app collection or external database}A request to a Wix app collection or an external database that you're working with returned with an error. Check that the data requests in your code are valid.
WDE0077'limit' cannot exceed {maximum query limit}The query limit you provided is greater than the maximum supported by the collection. Provide a lower value.
WDE0078Hook error.The code for one of your data hook functions threw an error.

For example, consider an afterInsert data hook function in a backend/data.js file that includes this line of code: throw new Error("sample error message")

Once you define this hook, calling the insert() function results in the WDE0078 error.
WDE0079{your collection name} is a single item collection and item must have id {expected ID}, but got {received ID} instead.The item in a single item collection has a fixed _id value. Check that you aren't trying to change this value in your code. You can find the item's _id value using the CMS or by using find() without any filters.
WDE0080{Multiple possible values.}This error occurs when you make an API call with invalid arguments. For example, if you use the query() function without providing a collection name as an argument. To resolve this error, check the API reference to make sure you're providing the right arguments in your code.
WDE0091Database quota exceeded. Delete some data and try again.Your site has exceeded the collection storage quota. Learn more about this quota and what you can do to resolve this issue.
WDE0092Dataset is too large to sort.The data you tried to sort didn't fit into memory. This usually occurs when large items are being sorted or there are too many items being sorted to fit into memory at once. Add an index to your collection to avoid using up memory.
WDE0093Invalid filter for _publishStatus field, only .eq and .ne filters are allowed with 'DRAFT' and 'PUBLISHED' possible values.When you enable the Draft and Publish Items feature for a collection, a _publishStatus field is added to every item in that collection. If you want to filter a data request based on this field, you can only use the eq() and ne() functions. The only valid values for _publishedStatus are 'DRAFT' and 'PUBLISHED'. Check that your code isn't using other filter functions or values with _publishedStatus.
WDE0110WD_BAD_REQUEST.System error. Please try running your code again.
WDE0111GridAppId must be provided in SANDBOX segmentTo resolve this error, reload your site in the browser.
WDE0115WD_UNKNOWN_ERRORYour external database requested an unsupported data operation.
WDE0116WD_UNKNOWN_ERRORYour external database responded to Wix with an error.
WDE0117MetaSiteId can not be resolved.System error. Please try running your code again.
WDE0118GridAppId {app ID} not found in instance {instance ID}.Request provided an invalid gridAppId. To resolve this error, reload your site in the browser.
WDE0120{your collection name} does not support {function name} operation.Some specialized collections, like the ones that hold data for Wix apps, don't support the full data API. This error occurs when you try to call a function that isn't supported by a specific collection. Remove the unsupported function call from your code.
WDE0121Sorting by multiple array fields is not supportedIf there are multiple fields in your collection that contain arrays, you can't sort by both of them at once.

For example, consider a collection item that includes a field called A whose value is [1,2,3] and a field called B whose value is [3,2,1]. In this case, attempting to sort by both A and B at once results in an error. If your collection contains multiple fields that are arrays, check that you aren't trying to sort using more than one at once.
WDE0123Duplicated values cannot be added to a field with a unique index.When you add a unique index to a collection, each value for the indexed field in that collection must be unique. This error occurs when you try to add a duplicate value for the field. To resolve the error, use a unique value.
WDE0128WD_UNKNOWN_ERRORYour external database adaptor tried to create a collection item with no _id field. Check that any item created by an external adaptor contains this field.
WDE0133Document field is too large to index, exceeds 1024 bytes.This error occurs when you try to add a value to an indexed field that's too large. The field value must be 1024 bytes or less. Learn more about working with indexes in your collections.
WDE0134Field names with dollar ($) prefix are not allowed.This error occurs when you try to add a field to a collection with a $ at the beginning of its name. To resolve this error, remove the $ from the name.
WDE0149Internal application error.This error occurs when a Wix app collection fails with a system or unrecognized error. To resolve the error, retry the request. If the request fails, contact support.
WDE0150Data hook syntax error.This error occurs when your data.js file, or any other file it imports from, contains a javascript syntax error. To resolve this error, fix syntax errors in the javascript codebase.

Was this helpful?