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

MFPRequest.send() on iOS does not return proper error objects

Closed this issue · 2 comments

In case my mobile backend returns an error (e.g. 404) MFPRequest.send() on iOS does not return a proper JSON object containing the error details. Instead I see this:

Error in Error callbackId: MFPRequest1423807252 : SyntaxError: JSON Parse error: Unexpected EOF

I debugged a little into it. The root cause here seems to be that stringifyResponse in CDVMFPRequest returns an empty string instead of returning the stringified JSON object. (NSJSONSerialization.isValidJSONObject(value) is false)

Sorry - my swift skills are good enough to use the debugger. Not good enough to provide a fix, though.

Aerex commented

@milliger V2 has been released. Try using this version and see if the problem still persists.

Seems that there has been no issue since. Closing this.