Skip to content

Commit 491e0b6

Browse files
Default value added for empty errorDescription parsing (#17)
1 parent 1f45f06 commit 491e0b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/mifos/connector/ams/pesacore/util/PesacoreUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class PesacoreUtils {
77

88
public static String parseErrorDescriptionFromJsonPayload(String errorJson) {
99
if (errorJson == null || errorJson.isEmpty()) {
10-
return null;
10+
return "Internal Server Error";
1111
}
1212
try {
1313
JsonObject jsonObject = (new Gson()).fromJson(errorJson, JsonObject.class);
@@ -21,7 +21,7 @@ public static String parseErrorDescriptionFromJsonPayload(String errorJson) {
2121
} catch (Exception e) {
2222
System.out.println(e.getMessage());
2323
}
24-
return null;
24+
return "Internal Server Error";
2525
}
2626

2727
}

0 commit comments

Comments
 (0)