I have used these codes to get my all products but when I set the limit to 1000 it gives me an error
import {ok, notFound, serverError} from ‘wix-http-functions’; import wixData from ‘wix-data’; // URL looks like: // https://www.mysite.com/_functions/myFunction/John/Doe // or: // https://user.wixsite.com/mysite/_functions/myFunction/John/Doe export function get_apis(request) { let options = { “headers”: { “Content-Type”: “application/json” } }; // query a collection to find matching items return wixData.query(“Stores/Collections”) .limit(1000) .find() .then( (results) => { // matching items were found if (results.items.length > 0) { options.body = { “items”: results.items }; return ok(options); } // no matching items found options.body = { “error”: ${request.path[0]} ${request.path[1]} wasn't found }; return notFound(options); } ) // something went wrong . catch ( (error) => { options.body = { “error”: error }; return serverError(options); } ); }
I got this errror