Skip to content

Commit a2d973b

Browse files
authored
Merge pull request #521 from AdobeDocs/em_revert-catpathwarn
Removing mention of warnings in reponse
2 parents 6897a21 + 4afb300 commit a2d973b

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

src/pages/graphql/schema/live-search/queries/product-search.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -384,42 +384,21 @@ filter:[
384384
]
385385
```
386386

387-
##### Error handling for categoryPath and categoryIds
387+
##### Error handling for categories, categoryPath, and categoryIds
388388

389-
When sorting by category `position` with an empty or invalid `categoryPath` or `categoryIDs`, the Search service gracefully handles the request to prevent `FAILED_PRECONDITION` errors. This scenario commonly occurs when attempting to sort by position at the root category level, where category paths are not standardized across store views.
389+
When sorting by category `position` with an empty or invalid `categories`, `categoryPath`, or `categoryIDs`, the Search service gracefully handles the request to prevent `FAILED_PRECONDITION` errors. This scenario commonly occurs when attempting to sort by position at the root category level, where category paths are not standardized across store views.
390390

391-
**Behavior when an empty or invalid `categoryPath` is detected with position sorting:**
391+
**Behavior when an empty or invalid `categories`, `categoryPath`, or `categoryIDs` is detected with position sorting:**
392392

393393
- Category position sort is ignored
394394
- The system falls back to relevance-based sorting
395395
- Products are returned successfully
396-
- A structured GraphQL warning is included in the response
397-
398-
**Warning message:**
399-
400-
The following warning is returned in the `errors` array alongside the product data:
401-
402-
```json
403-
{
404-
"errors": [
405-
{
406-
"message": "Sort ignored due to empty or invalid categoryPath or categoryIds. Default sorting by relevance applied.",
407-
"locations": [],
408-
"extensions": {
409-
"severity": "WARNING",
410-
"code": "EMPTY_CATEGORY_PATH_OR_CATEGORY_IDS",
411-
"classification": "DataFetchingException"
412-
}
413-
}
414-
]
415-
}
416-
```
417396

418397
<InlineAlert variant="info" slots="text"/>
419398

420-
Despite the warning, the query executes successfully and returns product data in the `data` object, sorted by relevance instead of position.
399+
Despite the empty or invalid `categories`, `categoryPath`, or `categoryIDs`, the query executes successfully and returns product data in the `data` object, sorted by relevance instead of position.
421400

422-
**Example query that triggers the warning:**
401+
**Example query:**
423402

424403
```graphql
425404
{
@@ -449,7 +428,7 @@ Despite the warning, the query executes successfully and returns product data in
449428
}
450429
```
451430

452-
In this example, the system returns products sorted by relevance with the warning message included in the response.
431+
In this example, the system returns products sorted by relevance.
453432

454433
#### categories
455434

0 commit comments

Comments
 (0)