ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core

MFPRequest Failure Callback Not Being Called

Closed this issue · 2 comments

Parsing this from a support ticket, any information I can relay to the customer is appreciated.

According to the customer when they attempt to send a MFPRequest and the server throws an error the code is not executing the failureResponse callback. I have not been able to verify with them whether the code is crashing due to an unhandled exception or if it's continuing to run but the failureResponse is just not executed.

For example should the server return an error in the sample code:

var keywords = "iphone SE";
var request = new MFPRequest("/twitter/search/"+keywords,
MFPRequest.GET);
request.send("",
          function(successResponse){
                  console.log("response for success::
" + JSON.stringify(successResponse));
          },
          function (failureResponse){
                 console.log("error");
          }
);

The user is not seeing "error" in the console and thus it is appearing that the failureResponse is not being triggered.

Thanks

Small update from customer, they aren't seeing the failureResponse even when the app doesn't crash. Still poking for more information.

Aerex commented

@YoungJM v2 of the plugin has been released. In v2 we have removed the use of relative paths unless you provide the app.route. Try using this version and see if the problem still persists.