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 StatusDescription
200 OKThe 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 OKA 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 RequestThe request was invalid or cannot be otherwise served. An accompanying error message gives further explanation.
401 UnauthorizedThere are missing or incorrect authentication credentials.
406 Not AcceptableThere is an invalid format specified in the request.
408 Request TimeoutThe client is uploading too much data, and the connection timed out
429 Too Many RequestsThe number of requests sent in a given time has reached the rate limit. Try again later.
500 Internal ErrorThere 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 GatewayThe Discover gateway is misconfigured, and the authentication token could not be validated. Clear your cache and cookies, and try again.
503 Server BusyThe Discover server is busy. Try again later.
504 Operation TimeoutThe 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:

CodeTypeDescriptionTroubleshooting Tip
101domain_id_not_foundCorresponds with HTTP 404. Not a valid domain_id.Check the domain ID and retry.
102bad_requestCorresponds with HTTP 400. The request was not properly formed.Check the error details and retry.
103degraded_responseCorresponds 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.
1000bad_contextCorresponds with HTTP 400. Not a valid JSON message.

The request context is not properly formed.
Check how context is formatted.
1001internal_server_errorCorresponds 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.
1003incorrect_recipe_idCorresponds 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.
1004missing_store_paramCorresponds 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.
1005missing_required_paramsCorresponds 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.
1006rfkid_not_foundCorresponds 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.
1007widget_not_foundCorresponds 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.
1008uri_not_foundCorresponds with HTTP 404. No page could be retrieved from the passed uri.In the CEC, check if the domain pages are properly configured.
1009container_not_foundCorresponds with HTTP 404. No page could be retrieved from the passed container_id.In the CEC, check if the domain has the container_id.
1010sku_not_foundCorresponds with HTTP 207. Product could not be retrieved from the passed sku.In the CEC, check if the domain has the passed sku.
1011product_group_not_foundCorresponds 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.
1012category_not_foundCorresponds with HTTP 207. The category could not be retrieved.In the CEC, check if the domain has the category_ID .
1013widget_not_in_pageCorresponds 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.
1014error_retrieving_widget_by_rfk_idCorresponds 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.
1015error_retrieving_widget_by_widget_idCorresponds 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!