BadMediaException
InvalidCompressionException
InvalidJsonException
MissingFieldException
PushException
UnknownErrorException
UnsupportedWidgetException
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
com.salesforce.marketingcloud.pushmodels.exceptions
Exception thrown when there is an error in the push module. This is the base exception for all push exceptions.
1open class PushException(
2 val errorCode: PushException.ErrorCode,
3 val message: String? = null
4) : Exception1constructor(
2 errorCode: PushException.ErrorCode,
3 message: String? = null
4)Parameters:
errorCode - The error code enum value indicating the type of push errormessage - Optional error message string (nullable, defaults to null)1val errorCode: PushException.ErrorCodeThe error code associated with this exception.
1open override val message: String?The optional error message describing the exception.
1fun toJson(): JSONObjectReturns the error message as a JSON object to be sent to the server.
Returns: A JSONObject representation of the error
1enum ErrorCode : Enum<PushException.ErrorCode>Enum defining the various error codes for push exceptions.
UNKNOWN_ERROR - Represents an unspecified or unknown error conditionINVALID_JSON - Indicates a JSON parsing or validation errorINVALID_COMPRESSION - Signifies an issue with data compressionMISSING_FIELD - Denotes a required field is absentUNSUPPORTED_TYPE - Indicates an unsupported data or content typeBAD_MEDIA - Represents an error related to media contententries - Returns an immutable list of all enum entries in declaration order (type: EnumEntries<PushException.ErrorCode>)valueOf(value: String) - Returns the enum constant matching the specified name (exact match required)values() - Returns an array of all constants in this enum typeThe following classes inherit from PushException:
InvalidJsonExceptionInvalidCompressionExceptionMissingFieldExceptionUnsupportedWidgetExceptionUnknownErrorExceptionBadMediaException