Errors and HTTP response status
If there is a problem with the request or response, Sitecore Discover returns error codes and HTTP response codes. The errors response object has details about the errors encountered while fulfilling the request. Sitecore Discover tries to serve the request partially even when there are errors.
Note
Errors associated with 500 HTTP statuses might not follow the prescribed format. This is because of potential multiple layers of load balancers, gateways, proxies, and so on.
HTTP response codes
The following table lists HTTP response codes that the Sitecore Discover APIs uses:
| HTTP Status | Description |
|---|---|
200 OK | The request was successful. Partial results might be returned when 200 is specified. Always check for errors even when you receive a 200 status. Evaluate the error and determine the action based on the relevance to your specific request. |
207 OK | A multi-status response conveys information about multiple resources in situations where multiple status codes might be appropriate. Check for errors and determine the action based on the relevance to your specific request. Currently, the response returns 200 when there are partial errors instead of 207. |
400 Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message gives further explanation. |
401 Unauthorized | There are missing or incorrect authentication credentials. |
406 Not Acceptable | There is an invalid format specified in the request. |
408 Request Timeout | The client is uploading too much data, and the connection timed out |
429 Too Many Requests | The number of requests sent in a given time has reached the rate limit. Try again later. |
500 Internal Error | There is an error on the Discover side. This is usually a temporary error, for example in a high load situation or if an endpoint is temporarily having issues. Try again later. |
502 Bad Gateway | The Discover gateway is misconfigured, and the authentication token could not be validated. Clear your cache and cookies, and try again. |
503 Server Busy | The Discover server is busy. Try again later. |
504 Operation Timeout | The Discover server took too long to respond. Try again later. |
Search and Recommendation error codes
The following table lists error codes that the Search and Recommendation API returns:
| Code | Type | Description | Troubleshooting Tip |
|---|---|---|---|
101 | domain_id_not_found | Corresponds with HTTP 404. Not a valid domain_id. | Check the domain ID and retry. |
102 | bad_request | Corresponds with HTTP 400. The request was not properly formed. | Check the error details and retry. |
103 | degraded_response | Corresponds with HTTP 200. This is not an error.The response did not honor all the configurations in the Customer Engagement Console (CEC). This usually happens when one or more services are not available or are busy. | If this happens for more than a few minutes, check the Discover service status page, or contact your support representative. |
1000 | bad_context | Corresponds with HTTP 400. Not a valid JSON message.The request context is not properly formed. | Check how context is formatted. |
1001 | internal_server_error | Corresponds with HTTP 500. Internal server error while processing request.This is usually a temporary error, for example in a high load situation, or if an endpoint is temporarily having issues. | If this happens for more than a few minutes, contact your support representative. |
1003 | incorrect_recipe_id | Corresponds with HTTP 500.Incorrect recipe ID for the widget. The recipe is not properly defined for the v2 domain. | In the CEC, review the recipe definition for the given rfk_id. |
1004 | missing_store_param | Corresponds with HTTP 400.The store parameters are not found in the request or in the context. | The domain is configured to require a store ID or a store group ID. If this was not intended, review the CEC settings. |
1005 | missing_required_params | Corresponds with HTTP 400.None of the required parameters are found in context: uri, container_id, widget_id, and rfk_ids | The request must contain at least one of the context parameters mentioned. Check your request and try again. |
1006 | rfkid_not_found | Corresponds with HTTP 404. No widget could be retrieved from the passed rfk_ids. | In the CEC, check if the domain has any of the passed rfk_ids. |
1007 | widget_not_found | Corresponds with HTTP 404. No widget could be retrieved from the passed widget_id. | In the CEC, check if the domain has the passed widget_id. |
1008 | uri_not_found | Corresponds with HTTP 404. No page could be retrieved from the passed uri. | In the CEC, check if the domain pages are properly configured. |
1009 | container_not_found | Corresponds with HTTP 404. No page could be retrieved from the passed container_id. | In the CEC, check if the domain has the container_id. |
1010 | sku_not_found | Corresponds with HTTP 207. Product could not be retrieved from the passed sku. | In the CEC, check if the domain has the passed sku. |
1011 | product_group_not_found | Corresponds with HTTP 207. The product could not be retrieved from the passed product group. | In the CEC, check if the domain has the passed product group. |
1012 | category_not_found | Corresponds with HTTP 207. The category could not be retrieved. | In the CEC, check if the domain has the category_ID . |
1013 | widget_not_in_page | Corresponds with HTTP 207. The page corresponding to the passed uri does not contain the required rfk_id or widget_id. | In the CEC, check if the domain pages are properly configured. |
1014 | error_retrieving_widget_by_rfk_id | Corresponds with HTTP 500. Internal server error retrieving widget by rfk_id.This is usually a temporary error, for example in a high load situation or if an endpoint is temporarily having issues. | If this happens for more than a few minutes, contact your support representative. |
1015 | error_retrieving_widget_by_widget_id | Corresponds with HTTP 500. Internal server error retrieving widget by widget_id.This is usually a temporary error. For example, a high load situation or an endpoint having temporary issues. | If this happens for more than a few minutes, contact your support representative. |
If you have suggestions for improving this article, let us know!