REST API error on iPad gives an error, in debugger works

I’ve got a REST API on AWS where I use POST to add new data. Suddenly this stopped working with iPad, gives an error “serverError”, “Non-JSON error body”. Cannot figure out where the problem is. Running the UI on browser debugger works fine ie. the data gets POSTed properly to the database. The HTTP request never get from iPad to AWS so the problem must be somewhere before in the process but where?

Thanks for any ideas on this:-)

Hi, I’d try to alert every part of the request just before you send it to your API. Just to check that e.g. token and payload in general are in order and haven’t some different info on iPad compared to your other tests. You can use ENCODE_JSON if the some part of the request includes more complex fields than just text, e.g. objects. (I remember having the same errors with some API when my token was undefined when sending the request)

Also, have you tried to alert or check in some other ways what’s in the rawError output of the HTTP request?