From 6a742ccf527a9bec538fa2e7f226403ed51bf808 Mon Sep 17 00:00:00 2001 From: Ishita Gambhir Date: Wed, 25 Sep 2024 11:49:27 +0530 Subject: [PATCH] add new error codes for AdobeError --- code/core/api/core.api | 4 ++++ .../java/com/adobe/marketing/mobile/AdobeError.java | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/code/core/api/core.api b/code/core/api/core.api index 4e30f5dfb..bc90e80ca 100644 --- a/code/core/api/core.api +++ b/code/core/api/core.api @@ -10,6 +10,10 @@ public class com/adobe/marketing/mobile/AdobeError : java/io/Serializable { public static final field CALLBACK_NULL Lcom/adobe/marketing/mobile/AdobeError; public static final field CALLBACK_TIMEOUT Lcom/adobe/marketing/mobile/AdobeError; public static final field EXTENSION_NOT_INITIALIZED Lcom/adobe/marketing/mobile/AdobeError; + public static final field INVALID_REQUEST Lcom/adobe/marketing/mobile/AdobeError; + public static final field INVALID_RESPONSE Lcom/adobe/marketing/mobile/AdobeError; + public static final field NETWORK_ERROR Lcom/adobe/marketing/mobile/AdobeError; + public static final field SERVER_ERROR Lcom/adobe/marketing/mobile/AdobeError; public static final field UNEXPECTED_ERROR Lcom/adobe/marketing/mobile/AdobeError; protected fun (Ljava/lang/String;I)V public fun getErrorCode ()I diff --git a/code/core/src/main/java/com/adobe/marketing/mobile/AdobeError.java b/code/core/src/main/java/com/adobe/marketing/mobile/AdobeError.java index dbb4e9402..bd44940b6 100644 --- a/code/core/src/main/java/com/adobe/marketing/mobile/AdobeError.java +++ b/code/core/src/main/java/com/adobe/marketing/mobile/AdobeError.java @@ -27,6 +27,18 @@ public class AdobeError implements Serializable { /** when a callback is null. */ public static final AdobeError CALLBACK_NULL = new AdobeError("general.callback.null", 2); + /** when a server error happens. */ + public static final AdobeError SERVER_ERROR = new AdobeError("general.server.error", 4); + + /** when a network error happens. */ + public static final AdobeError NETWORK_ERROR = new AdobeError("general.network.error", 5); + + /** when an invalid request is made. */ + public static final AdobeError INVALID_REQUEST = new AdobeError("general.request.invalid", 6); + + /** when an invalid response is received. */ + public static final AdobeError INVALID_RESPONSE = new AdobeError("general.response.invalid", 7); + /** when a extension is not initialized. */ public static final AdobeError EXTENSION_NOT_INITIALIZED = new AdobeError("general.extension.not.initialized", 11);