Class ShopperContextException
This exception could be thrown by ShopperContextMgr.setShopperContext(ShopperContext, Boolean), ShopperContextMgr.getShopperContext() and ShopperContextMgr.removeShopperContext() when an error occurs.
'errorCode' property is set to one of the following values:
- ShopperContextErrorCodes.FEATURE_DISABLED= Indicates that the Shopper Context Feature is not enabled.
- ShopperContextErrorCodes.CUSTOM_QUALIFIERS_LIMIT_EXCEEDED= Indicates that the number of custom qualifiers in ShopperContexthas exceeded the allowed limit.
- ShopperContextErrorCodes.ASSIGNMENT_QUALIFIERS_LIMIT_EXCEEDED= Indicates that the number of assignment qualifiers in ShopperContexthas exceeded the allowed limit.
- ShopperContextErrorCodes.QUOTA_LIMIT_EXCEEDED= Indicates that the quota limit for the Shopper Context has been reached.
For more information on shopper context quota limits please refer to: Shopper Context Quota Limits
- ShopperContextErrorCodes.INTERNAL_ERROR= Indicates that an error occurred while setting, retrieving or deleting the shopper context.
- ShopperContextErrorCodes.INVALID_ARGUMENT= Indicates that an invalid client IP address was set in the Shopper Context.
- ShopperContextErrorCodes.INVALID_REQUEST_TYPE= Indicates that the request type is invalid. Request must be a SCAPI request, or a hybrid storefront request, or an OCAPI request using a SLAS token.
| Property | Description |
|---|---|
errorCode: String (read-only) | Indicates reason why the following methods failed: ShopperContextMgr.setShopperContext(ShopperContext, Boolean) or ShopperContextMgr.getShopperContext() or ShopperContextMgr.removeShopperContext() failed. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getErrorCode() | Indicates reason why the following methods failed: ShopperContextMgr.setShopperContext(ShopperContext, Boolean) or ShopperContextMgr.getShopperContext() or ShopperContextMgr.removeShopperContext() failed. |
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
- errorCode: String
(read-only) Indicates reason why the following methods failed: ShopperContextMgr.setShopperContext(ShopperContext, Boolean) or ShopperContextMgr.getShopperContext() or ShopperContextMgr.removeShopperContext() failed.
- getErrorCode(): String
Indicates reason why the following methods failed: ShopperContextMgr.setShopperContext(ShopperContext, Boolean) or ShopperContextMgr.getShopperContext() or ShopperContextMgr.removeShopperContext() failed.
Returns:
- The error code.