Closed asadkhawaja1 closed 4 years ago
Hey @asadkhawaja1 ,
Could you post the request body and header please (without your client secret/short code)?
Cheers, Josh
Request URL: http://localhost:3000/api Request Method: POST Status Code: 200 OK Remote Address: [::1]:3000
POST /api HTTP/1.1 Host: localhost:3000 Connection: keep-alive Content-Length: 995 content-type: application/json Origin: http://localhost:3000 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: http://localhost:3000/search/Tops
{"operationName":null,"variables":{"query":"Tops","filters":[]},"query":"query ($query: String!, $filters: [Filter]) {\n productSearch(query: $query, filterParams: $filters) {\n productHits {\n productId\n productName\n prices {\n sale\n list\n typename\n }\n image {\n title\n link\n alt\n typename\n }\n colorSwatches {\n name\n value\n title\n link\n alt\n style\n typename\n }\n typename\n }\n sortingOptions {\n id\n label\n typename\n }\n refinements {\n values {\n label\n value\n hitCount\n values {\n label\n value\n hitCount\n typename\n }\n typename\n }\n label\n attributeId\n typename\n }\n currentFilters {\n id\n value\n typename\n }\n typename\n }\n}\n"}
{"errors":[{"message":"Cannot read property 'title' of undefined","locations":[{"line":2,"column":3}],"path":["productSearch"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["TypeError: Cannot read property 'title' of undefined"," at new Image (D:\Work\Salesforce\Sample Apps\sfcc-sample-apps\packages\@sfcc-bff\productapi\src\api\models\Image.js:11:28)"," at new SearchResultProduct (D:\Work\Salesforce\Sample Apps\sfcc-sample-apps\packages\@sfcc-bff\productapi\src\api\models\SearchResultProduct.js:48:22)"," at D:\Work\Salesforce\Sample Apps\sfcc-sample-apps\packages\@sfcc-bff\productapi\src\api\models\SearchResult.js:17:34"," at Array.map (
can this help?
hey @asadkhawaja1 ,
Can you send me the config you have used also private ( jbegleiter AT salesforce DOT com)? I am guessing there is some issue in the config, which is why you are seeing an ISE.
Cheers, Josh
sure @jbegleiter-sf I will email you in a while.
Thanks.
I have followed the steps to set up the sample application sfcc-sample-apps.
After starting the App and opening http://localhost:3000 when I click on "Shop Now" or any other link which should redirect to http://localhost:3000/search/Tops , http://localhost:3000/search/Ties or http://localhost:3000/search/Coats
I am getting this on Page
**No results for coats.
Search Tips:
Double-check spelling. Change your search query. Be less specific.**
while there is no any error in the terminal.