PushException

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.

Parameters:

  • errorCode - The error code enum value indicating the type of push error
  • message - Optional error message string (nullable, defaults to null)

The error code associated with this exception.

The optional error message describing the exception.

Returns the error message as a JSON object to be sent to the server.

Returns: A JSONObject representation of the error

Enum defining the various error codes for push exceptions.

  • UNKNOWN_ERROR - Represents an unspecified or unknown error condition
  • INVALID_JSON - Indicates a JSON parsing or validation error
  • INVALID_COMPRESSION - Signifies an issue with data compression
  • MISSING_FIELD - Denotes a required field is absent
  • UNSUPPORTED_TYPE - Indicates an unsupported data or content type
  • BAD_MEDIA - Represents an error related to media content
  • entries - 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 type

The following classes inherit from PushException:

  • InvalidJsonException
  • InvalidCompressionException
  • MissingFieldException
  • UnsupportedWidgetException
  • UnknownErrorException
  • BadMediaException
  • Part of: Salesforce Marketing Cloud Unified SDK
  • Module: Push Models Module v1.0.2
  • SDK Version: 11.0.0
  • Platform: androidJvm