0
votes

My problem is that I'm trying to call cloud code from a user with an invalid session token and instead of getting an error that tells me there's an invalid session token I keep getting 400 request errors from server. I can't handle and log out the user because there is no cloud code response at all on the client side. How could I handle getting this error and logging the user out?

1

1 Answers

0
votes

You can handle cloud code errors by using the error callback

Parse.Cloud.run("function", null).then(function(response){
    // Successfully called
}, function(error){
    // Error calling cloud code
});