Custom server coding issues.
I have the java code on the server working fine. And I have been able to call it successfully using IOS and swift.
On java however, I am throwing an exception and cannot for the life of me determine why. Help please....
public void fetch (int count, final OnCompleteCallback callback) {
final CustomCodeService customCodeService = App42API.buildCustomCodeService();
try {
customCodeService.runJavaCode("Prayerful", null, new App42CallBack() {
@Override
public void onSuccess(final Object o) {
JSONObject storage = (JSONObject) o;
try {
JSONObject r = (JSONObject) storage.get("result");
callback.onSuccess();
} catch (Exception ex) {
}
}
@Override
public void onException(final Exception e) {
String msg = e.getMessage(); <--------------- Hitting this exception.
callback.onException(e);
}
});
} catch (Exception e) {
}
}
The exception is:
com.shephertz.app42.paas.sdk.android.App42Exception: org.json.JSONException: Value <html><body>404< of type java.lang.String cannot be converted to JSONObject
Thoughts? Not sure why I can run it from the UI Console and from Swift just fine but Android is barfing.