Skip to content

Commit

Permalink
Android SDK v3.13.0 | Error: Status Code Added
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaileshmishra committed Jan 31, 2024
1 parent a0af4af commit f634a8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contentstack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android.buildFeatures.buildConfig true
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT)
signAllPublications()
coordinates("com.contentstack.sdk", "android", "3.12.5")
coordinates("com.contentstack.sdk", "android", "3.13.0-SNAPSHOT")

pom {
name = "contentstack-android"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public void onRequestFailed(JSONObject error, int statusCode, ResultCallBack cal
errorObject.setErrorCode(errorCode);
errorObject.setErrorMessage(errorMessage);
errorObject.setErrors(resultHashMap);
errorObject.setStatusCode(statusCode);

if (this.callBackObject != null) {
this.callBackObject.onRequestFail(ResponseType.NETWORK, errorObject);
Expand Down
10 changes: 10 additions & 0 deletions contentstack/src/main/java/com/contentstack/sdk/Error.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ public class Error {

String errorMessage = null;
int errorCode = 0;

public int getStatusCode() {
return statusCode;
}

public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}

int statusCode = 0;
HashMap<String, Object> errorHashMap = new HashMap<>();

/**
Expand Down

0 comments on commit f634a8d

Please sign in to comment.