Class ShopperConsentException
This exception is thrown by ShopperConsentMgr methods when an error occurs during consent subscription operations.
The ‘errorCode’ property is set to one of the following values:
- ShopperConsentErrorCodes.FEATURE_DISABLED- Indicates that the Marketing Consent feature is not enabled.
- ShopperConsentErrorCodes.RETRIEVAL_ERROR- Indicates that an error occurred while retrieving consent subscriptions.
- ShopperConsentErrorCodes.UPDATE_ERROR- Indicates that an error occurred while updating consent subscriptions.
- ShopperConsentErrorCodes.CUSTOMER_NOT_AUTHENTICATED- Indicates that the customer is not authenticated (required for consent status retrieval).
- ShopperConsentErrorCodes.INTERNAL_ERROR- Indicates that an internal error occurred.
| Property | Description |
|---|---|
errorCode: String (read-only) | Returns the error code indicating the reason for the failure. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| getErrorCode() | Returns the error code indicating the reason for the failure. |
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) Returns the error code indicating the reason for the failure.
- getErrorCode(): String
Returns the error code indicating the reason for the failure.
Returns:
- The error code.