{"action":"opened","issue":{"url":"https://api.github.com/repos/moip/android-sdk-sample/issues/2","labels_url":"https://api.github.com/repos/moip/android-sdk-sample/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/moip/android-sdk-sample/issues/2/comments","events_url":"https://api.github.com/repos/moip/android-sdk-sample/issues/2/events","html_url":"https://github.com/moip/android-sdk-sample/issues/2","id":62601334,"number":2,"title":"Can not parse json response. [MoipErrorParser.java]","user":{"login":"asparmar","id":11471510,"avatar_url":"https://avatars.githubusercontent.com/u/11471510?v=3","gravatar_id":"","url":"https://api.github.com/users/asparmar","html_url":"https://github.com/asparmar","followers_url":"https://api.github.com/users/asparmar/followers","following_url":"https://api.github.com/users/asparmar/following{/other_user}","gists_url":"https://api.github.com/users/asparmar/gists{/gist_id}","starred_url":"https://api.github.com/users/asparmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asparmar/subscriptions","organizations_url":"https://api.github.com/users/asparmar/orgs","repos_url":"https://api.github.com/users/asparmar/repos","events_url":"https://api.github.com/users/asparmar/events{/privacy}","received_events_url":"https://api.github.com/users/asparmar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-18T06:07:13Z","updated_at":"2015-03-18T06:07:13Z","closed_at":null,"body":"I am trying to test Moip Android SDK in my android app. Below is my code.\r\n\r\n```java\r\nMoip.createPayment(payment, new MoipCallback<Payment>() {\r\n                    @Override\r\n                    public void success(final Payment payment) {\r\n                        Log.d(\"MOIP\", \"Payment success.....\");\r\n                        if (progressDialog != null){ try { progressDialog.dismiss(); }catch (Exception itsOkay){} }\r\n                        new SavePaymentTask(getActivity(), ticketPayment).execute();\r\n                    }\r\n\r\n                    @Override\r\n                    public void failure(final List<MoipError> moipErrorList) {\r\n                        Log.e(\"MOIP\", \"Payment failed.....\");\r\n                        for (MoipError moipError : moipErrorList){\r\n                            Log.d(\"MOIP\", \"ERR.getCode: \" + moipError.getCode());\r\n                            Log.d(\"MOIP\", \"ERR.getDescription: \" + moipError.getDescription());\r\n                            Log.d(\"MOIP\", \"ERR.getPath: \" + moipError.getPath());\r\n                            Log.d(\"MOIP\", \"ERR.moipError: \" + moipError.toString());\r\n                        }\r\n                        if (progressDialog != null){ try { progressDialog.dismiss(); }catch (Exception itsOkay){} }\r\n                    }\r\n                });\r\n```\r\n\r\nWhen I ececute this code, failure callback method is called with all null values. And I am getting following in the log cat.\r\n\r\n```\r\n  E/Error while decoding﹕ 404 feign.Response$InputStreamBody@41f0ac38\r\n W/System.err﹕ org.json.JSONException: Value Not of type java.lang.String cannot be converted to JSONObject\r\n W/System.err﹕ at org.json.JSON.typeMismatch(JSON.java:111)\r\n W/System.err﹕ at org.json.JSONObject.<init>(JSONObject.java:158)\r\n W/System.err﹕ at org.json.JSONObject.<init>(JSONObject.java:171)\r\n W/System.err﹕ at br.com.moip.sdk.parser.MoipErrorParser.fromString(MoipErrorParser.java:51)\r\n W/System.err﹕ at br.com.moip.sdk.Moip.createPayment(Moip.java:83)\r\n W/System.err﹕ at com.blackfoxweb.colaxi.CheckoutFragment$MoipPaymentTask.doInBackground(CheckoutFragment.java:354)\r\n W/System.err﹕ at com.blackfoxweb.colaxi.CheckoutFragment$MoipPaymentTask.doInBackground(CheckoutFragment.java:334)\r\n W/System.err﹕ at android.os.AsyncTask$2.call(AsyncTask.java:287)\r\n W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:234)\r\n W/System.err﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)\r\n W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\r\n W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\r\n W/System.err﹕ at java.lang.Thread.run(Thread.java:856)\r\n I/Errors﹕ Not Found\r\n E/MOIP﹕ Payment failed.....\r\n E/MOIP﹕ ERR.getCode: null\r\n E/MOIP﹕ ERR.getDescription: null\r\n E/MOIP﹕ ERR.getPath: null\r\n E/MOIP﹕ ERR.moipError: MoipError{code='null', path='null', description='null'}\r\n\r\n```\r\n\r\nI guess the MoipError object received in response contains a string which can not be converted to JSONObject. Is there any other way to see what response we are getting in the failure() method?"}}