I’m not sure what’s causing this, but I’d suggest that you change the way you’re doing things. Using the Parse.Cloud.run
function makes an uncessary network request (unless you have directAccess enabled). What’s more is that, if you look at the request, you’ll see that the reqeust is different from your originating request.
So, I’d recomment you pull that function out into a separate file. This way, you can call it like a standard backend function and chose what you expose via Parse.Cloud.define
.
Here’s an example of what I mean:
In a file called something like utils.js you could do this:
export const funA = async function (user) {
if(!user) {
throw new Parse.Error(-1,"no user")
}
// Do something
})
Then in your cloud.{js, ts} file:
import * as utils from './utils';
// if you want to make funA available to the outside world:
Parse.Cloud.define("funA", utils.funA);
// then to call funA from funB:
Parse.Cloud.define("funB", async function (request) {
var user = request.user;
return utils.funA(user);
})
I hope this helps.